I use SmartGit as a GUI for git. But so far, I always have the same problem. In my projects (all of them), I can't pull, the button is disabled, it's only the "fetch only" button which is available.
But if I run the command git pull origin master
it works fine and I can continue to use SmartGit as usual.
How to get rid of this problem ?
Git Fetch is the command that tells the local repository that there are changes available in the remote repository without bringing the changes into the local repository. Git Pull on the other hand brings the copy of the remote directory changes into the local repository.
git fetch is the command that tells your local git to retrieve the latest meta-data info from the original (yet doesn't do any file transferring. It's more like just checking to see if there are any changes available). git pull on the other hand does that AND brings (copy) those changes from the remote repository.
If you have a single remote repository, then you can omit all arguments. just need to run git fetch , which will retrieve all branches and updates, and after that, run git checkout <branch> which will create a local copy of the branch because all branches are already loaded in your system.
Git Pull Doesn't Do A Git Fetch.
Make sure that your master
is tracking origin/master
. You may use Set Tracked Branch in the Branches view to configure tracking.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With