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
84
votes
6 answers

Git: How to move back and forth between commits

I have a newbie question about Git: I need to move back and forth in a history of a branch. That means, I need to get all the files to the state they were in in some old revision, and then I need to get back to the latest state in the repository. I…
Ondra Žižka
  • 43,948
  • 41
  • 217
  • 277
81
votes
3 answers

Git pulling changes between two local repositories

I have two clones of same remote repository. I have made some changes to one local repository, how can I pull these changes to the other local repository without pushing it to the remote?
Sirish
  • 9,183
  • 22
  • 72
  • 107
79
votes
17 answers

Why does git pull hang?

When I do a git pull, from the git bash, the terminal usually runs the pull, updates my local, and then hangs. I'm not sure if it's waiting for me to do something, but I usually exit out of this with CTRL-C. After that, I get that an index.lock is…
user3685285
  • 6,066
  • 13
  • 54
  • 95
75
votes
1 answer

Why does my git history look like a christmas tree?

When doing git log --decorate --oneline --graph in one of our repositories shortly before Christmas, we found that the following structure had appeared (rotated to emphasize the tenuous festive theme): How did this pattern in the commit graph…
Mark Longair
  • 446,582
  • 72
  • 411
  • 327
73
votes
3 answers

git pull --rebase vs git rebase : what's the danger?

I don't understand the difference between git pull --rebase and git rebase, without any other options. I don't understand if they are safe, a good practice, or very dangerous. Can I break the history of commits by doing a git pull --rebase in local?
sab
  • 4,352
  • 7
  • 36
  • 60
72
votes
2 answers

Git pull - can't submit merge message

Possible Duplicate: github locks up mac terminal when using pull command I am using Git via the terminal on the mac. I have encountered an annoying problem recently when I try to perform git pull. After performing git pull I receive the following…
Daan
  • 1,663
  • 1
  • 15
  • 13
71
votes
6 answers

executing a git pull from a different directory

I'm configuring calimoucho (a little play continuos integration server), and for it to work I need to run a command to pull a cloned git hub repository from outside it. to be more precise, I'll explain it with an example. I have the following…
opensas
  • 60,462
  • 79
  • 252
  • 386
69
votes
3 answers

Git Pull vs. Pull Request

I'm new to using Git, so I apologize if this is trivial. I have a private repository set up using Github and EGit. To update and merge my local repository branch with the remote version (essentially a git pull), I use Team > Pull in Eclipse. To…
Jonn
  • 1,594
  • 1
  • 14
  • 25
69
votes
4 answers

Undoing a git pull --rebase

Hey I'm new to git and I need to undo a pull, can anyone help?!? So what I've done is... git commit git stash git pull --rebase git stash pop this created a bunch of conflicts and went a bit wrong. Now doing 'git stash list' reveals that my stash…
Thomas
  • 983
  • 2
  • 7
  • 15
68
votes
8 answers

git push rejected: error: failed to push some refs

I know people have asked similar questions, but I believe the causes of their problems to be different. I did a hard reset because I had messed up my code pretty bad git reset --hard 41651df8fc9 I've made quite some changes, I've made some…
Eric
  • 3,301
  • 4
  • 33
  • 39
68
votes
3 answers

How to pull into not-the-current-branch?

Say my current branch is myfeature. I want to get master up to date. Both git merge git pull always merge into the current branch, as far as I can tell. Is there a way to merge changes from a remote branch (eg, origin/master) into a branch I'm not…
Steve Bennett
  • 114,604
  • 39
  • 168
  • 219
66
votes
13 answers

Visual Studio 2015 Git error message "Cannot pull/switch because there are uncommitted changes"

I am having difficulty in doing a pull from origin. I keep getting: "Cannot pull because there are uncommitted changes. Commit or undo your changes before pulling again. See the Output window for details." This also applies to switching branches.…
kwiri
  • 1,399
  • 2
  • 15
  • 22
62
votes
1 answer

git rebase upstream/master vs git pull --rebase upstream master

Is there a difference between git rebase upstream/master and git pull --rebase upstream master, and if so, what? The remote could be any remote, not necessarily upstream.
Dennis
  • 56,821
  • 26
  • 143
  • 139
60
votes
6 answers

Git pull asks me to write merge message

I pull from my branch: git checkout mybranchSample git fetch git pull origin master Then, Git gives me the following message: Please enter a commit message to explain why this merge is necessary, especially if it merges an updated upstream into…
Pratik Joshi
  • 11,485
  • 7
  • 41
  • 73
60
votes
5 answers

How can I pull an existing heroku app to new location for development?

I currently have the latest version of my code on another computer that I want to develop from (Home computer and laptop for when I'm out and about) I set up heroku for my app on my laptop. Now I need to associate my code on my desktop so that I can…
aarona
  • 35,986
  • 41
  • 138
  • 186