1, to solve the problem
By default, all the latest data will operate a remote repository git pull updates locally.
But if you want a particular file or update the specified folder, how does it work?
2, git pull only one file / folder
-
Set
core.sparsecheckout
to true
$ git config core.sparsecheckout true
-
core.sparsecheckout
Pull provided for controlling whether to allow the specified file / folder, true is allowed. -
This method is suitable for Git1.7.0 later, the previous version without this feature.
-
In the
.git/info/sparse-checkout
document (if not create) Adds the specified file / folder -
Finally, you want to pull a branch can be realized checkout specified file / folder.
$ git pull origin master