Linked Questions
33 questions linked to/from Alter repository directory structure using sparse checkout
2018 votes
26 answers
334k views
Detach (move) subdirectory into separate Git repository
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 ...
609 votes
27 answers
769k views
How to sparsely checkout only one single file from a git repository?
How do I checkout just one file from a git repo?
257 votes
5 answers
192k views
Having a private branch of a public repo on GitHub?
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 ...
191 votes
10 answers
185k views
Checkout subdirectories in Git?
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: ...
24 votes
8 answers
15k views
Why to use SVN? Any hidden pros (over GIT/Mercurial/Bazaar) there? [duplicate]
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 ...
40 votes
3 answers
38k views
Set Git submodule to shallow clone & sparse checkout?
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 ...
25 votes
6 answers
29k views
Git sparse checkout with exclusion
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/ ...
16 votes
7 answers
9k views
Is there any distributed revision control system that supports partial checkout/clone?
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 ...
7 votes
5 answers
2k views
Using git as a centralized version server
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 ...
7 votes
2 answers
6k views
git svn clone except a particular folder
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 (...
11 votes
2 answers
6k views
Fork a file from a Git repository without cloning the repository
Is there a way to fork a file from a foreign Git repository without cloning the whole repository?
4 votes
2 answers
4k views
How to sync a subdirectory of a git repo?
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-...
6 votes
2 answers
4k views
How do I count total lines of remote git repository
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 ...
4 votes
1 answer
3k views
What are the advantages of git submodule over a symbolic link?
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 ...
5 votes
1 answer
4k views
git operations on remote repository without local clone
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 ...