Linked Questions

2018 votes
26 answers
334k views

I have a Git repository which contains a number of subdirectories. Now I have found that one of the subdirectories is unrelated to the other and should be detached to a separate repository. How can I ...
matli's user avatar
  • 28.7k
609 votes
27 answers
769k views

How do I checkout just one file from a git repo?
Arthur Ulfeldt's user avatar
257 votes
5 answers
192k views

I have a public PHP project in a GitHub repo, which contains just one branch (master). I want to have a separate branch/fork that is private for me (I have paid for private GitHub repos). I would ...
Lizard's user avatar
  • 45.3k
191 votes
10 answers
185k views

Is it possible to check out subdirectories of a repository in Git? Imagine I am setting up a new WordPress installation. I will create two new directories for my plugin and theme customization: ...
user avatar
24 votes
8 answers
15k views

Possible Duplicates: Why is git better than Subversion? I've already read a lot (not enough to get the perfect picture though) about versioning systems, and the obvious conclusion is that GIT is ...
Ivan's user avatar
  • 64.5k
40 votes
3 answers
38k views

Many vendor Objective-C libraries (e.g., facebook-ios-sdk) instruct you to copy a certain subset of its repo's files/dirs into your Xcode project. One problem with this is then you do not know what ...
ma11hew28's user avatar
  • 128k
25 votes
6 answers
29k views

According to this thread, exclusion in Git's sparse-checkout feature is supposed to be implemented. Is it? Assume that I have the following structure: papers/ papers/... presentations/ ...
krlmlr's user avatar
  • 25.6k
16 votes
7 answers
9k views

As far as I know all distributed revision control systems require you to clone the whole repository. For this reason is it not wise to put huge amounts of content into one single repository (thanks ...
Jakob's user avatar
  • 3,710
7 votes
5 answers
2k views

I currently use svn at work. Our setup is: everyone has a working copy and we commit to a svn server served by apache2. So I commit changed, the other update, and everyone can work on the copy as ...
Tommy B.'s user avatar
  • 3,679
7 votes
2 answers
6k views

I want to git clone an svn repository except for one folder in the root folder of svn. How do I do it? I could do git svn clone svnrepo/dir/sb-dir/ if I needed only sb-dir but I need all folders (...
lprsd's user avatar
  • 87.9k
11 votes
2 answers
6k views

Is there a way to fork a file from a foreign Git repository without cloning the whole repository?
Alexander Zeitler's user avatar
4 votes
2 answers
4k views

I want to pull from and push to only a subdirectory of a git repository. Here is an example of what I want to achieve: Let's say, I have a repository, containing two folders A and B (they are top-...
Peter Varo's user avatar
  • 12.4k
6 votes
2 answers
4k views

I wanna count to total lines of codes in git repository. I've found the answer in google. git ls-files -z | xargs -0 cat | wc -l It works well in local repository. but. I want to count in ...
chris's user avatar
  • 83
4 votes
1 answer
3k views

I have a git repository (A) that includes a library code that I need to reuse in the second repository (B). My understanding is that git submodule does not allow to import only specific path within a ...
Jan Wrobel's user avatar
  • 7,137
5 votes
1 answer
4k views

What kind of read-only operations are possible on a remote git repository using the standard git command line tool without having a local clone? Is there some way to list refs (in particular tags and ...
MvG's user avatar
  • 61.8k

15 30 50 per page