Questions tagged [git-pull]

Fetches changes from a remote repository and incorporates them into the current branch of a Git repository.

git pull is used whenever changes from a remote repository need to be fetched and incorporated into the local repository. Internally git pull first performs a git fetch to get the remote branches updated and then a git merge to incorporate the changes into the current branch.

1231 questions
140
votes
3 answers

No "pull" in Git Gui?

How can I make a pull using Git GUI tool? It seems there is no pull command anywhere. Is there an equivalent menu option using Git GUI? Any help will be appreciated.
Alberto Montellano
  • 5,886
  • 7
  • 37
  • 53
139
votes
13 answers

Git: How to check if a local repo is up to date?

I would like to know if my local repo is up to date (and if not, ideally, I would like to see the changes). How could I check this without doing git fetch or git pull ?
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
139
votes
14 answers

git checkout tag, git pull fails in branch

I have cloned a git repository and then checked out a tag: # git checkout 2.4.33 -b my_branch This is OK, but when I try to run git pull in my branch, git spits out this error: There is no tracking information for the current branch. Please …
alesko
  • 1,821
  • 3
  • 14
  • 18
138
votes
4 answers

Detail change after Git pull

After a Git pull, its output gives a summary on the change amount. How can I see each or some of the files detailed changes? Okay, here is my question to Jefromi: How do I know if I was pulling to master? All I did is "git pull". What does master…
Tim
  • 1
  • 141
  • 372
  • 590
128
votes
2 answers

You asked me to pull without telling me which branch you want to merge with

TL;DR: I have a "tracked" branch that I can't pull. So here I am in "bucket-4": $ git branch -v bucket-1 410f7b5 * gh-53 * gh-48 * "Share App" bucket-2 7ed70a2 * upgrade to SOLR 3.3.0 bucket-3 400ffe4 * emergency fix prod…
George Armhold
  • 30,824
  • 50
  • 153
  • 232
119
votes
5 answers

How Do I 'git fetch' and 'git merge' from a Remote Tracking Branch (like 'git pull')

I have set up some remote tracking branches in git, but I never seem to be able to merge them into the local branch once I have updated them with 'git fetch'. For example, suppose I have remote branch called 'an-other-branch'. I set that up locally…
kaybenleroll
  • 16,794
  • 16
  • 54
  • 66
115
votes
13 answers

How do I check the date and time of the latest `git pull` that was executed?

How do I check the date and time of the latest git pull that was executed? I frequently need to know when the code changed on a server when something goes wrong.
Chirag Patel
  • 5,819
  • 8
  • 35
  • 38
115
votes
5 answers

How to unmerge a Git merge?

I accidentally did a git pull origin master from dev, and master got merged into dev. Is it possible to unmerge? I've already seen different solutions, i tried this one from both dev and master : git revert -m 1 (once each) But i got :…
redAce
  • 1,558
  • 4
  • 14
  • 24
101
votes
3 answers

Git undo merge attempt

I have working directory (#1) which has vendor directory(#2) in it. There is one dependency which I wanted to pull manually without composer (php version of npm/gem). I was working in #1, haven't saved/commited changes, when I decided I want to…
ewooycom
  • 2,651
  • 5
  • 30
  • 52
99
votes
7 answers

Git pull - Please move or remove them before you can merge

I am trying to do a git pull origin master from my server but keep getting the error: Please move or remove them before you can merge. There are no untracked files, but it seems like it has issues with the ignored files for some reason. I tried…
Brett
  • 19,449
  • 54
  • 157
  • 290
92
votes
9 answers

Is there a "git pull --dry-run" option in Git?

Is there such a thing as git pull --dry-run to see how stuff will be merged before it messes up my working tree? Right now I am doing: git fetch origin && git merge --no-commit --no-ff I did not see anything in the man page for 'git-pull' related…
Danila Ladner
  • 863
  • 1
  • 7
  • 16
91
votes
6 answers

How can I make my local repository available for git-pull?

I have a working copy repository that I've been working in no problem; the origin for this repository is on GitHub. I'd like to make my working copy repository available as the origin for my build machine (a VM on another physical host), so that…
alastairs
  • 6,697
  • 8
  • 50
  • 64
91
votes
3 answers

'git pull origin mybranch' leaves local mybranch N commits ahead of origin. Why?

I just observed something odd about git pull, which I don't understand. On Friday, I worked on a local branch. let's call it mybranch. Before leaving the office I pushed it to origin (which is my github repo): git push origin mybranch. Yesterday at…
mxk
  • 43,056
  • 28
  • 105
  • 132
88
votes
13 answers

How can I fetch an unmerged pull request for a branch I don't own?

I need to pull in a specific pull request (that hasn't been processed into the main stream yet) in the NServiceBus repo: https://github.com/johnsimons/NServiceBus/commit/d8524d53094e8181716e771c1023e968132abc15 It's obviously not my repo, but I need…
user156888
86
votes
7 answers

How do I pull from another computer's repository in Git?

For example, I have cloned the origin repository on two computers. Then, I go ahead and make some changes and commit to the local repository of computer A. How do I now pull these changes to computer B? Both computer A and B are connected to a…
jeffreyveon
  • 13,400
  • 18
  • 79
  • 129
1 2
3
82 83