Before using pull, I want to check if there are any differences between my local and GitHub master.
How can I do it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
git pullis really equivalent to runninggit fetchand thengit merge. Thegit fetchupdates your so-called “remote-tracking branches” – typically these are ones that look likeorigin/master,github/experiment, etc. that you see withgit branch -r. These are like a cache of the state of branches in the remote repository that are updated when you dogit fetch(or a successfulgit push).So, suppose you’ve got a remote called
originthat refers to your GitHub repository, you would do:… and then do:
… in order to see the difference between your
master, and the one on GitHub. If you’re happy with those differences, you can merge them in withgit merge origin/master, assumingmasteris your current branch.Personally, I think that doing
git fetchandgit mergeseparately is generally a good idea.