Git how to check only a folder – Sparse checkout

MacBook Pro affichant un éditeur de code

Since git 1.7.0 it is possible to use a technique called sparse checkout The steps for cloning are: Mkdir<repo></repo> Cd<repo></repo> git init git remote add -f origin<url></url> This creates an empty folder, runs the fetches but without checking out the files. Then you have to configure git to use sparseCheckout. git config core.sparseCheckout true Then … Read more

Git doesn’t fetch all branches in remote

MacBook Pro affichant un éditeur de code

Sometimes when you work with git, you don’t find all the remote branches. Even after using git fetch they do not appear. fetch git it is very likely that the origin of the fetch is wrong. We can see, for example, that here only the master branch is updated. $ git config –get remote.origin.fetch ‘refs/heads/master:refs/remotes/origin/master … Read more