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
58
votes
4 answers

How do I pull a missing file back into my branch?

I have cloned a Git project into a local Git repository. Then I have done something nasty to one of the files and in that panic I deleted file physically from the drive (rm style.css) and also removed it from Git (git rm style.css). I want to get…
feronovak
  • 2,687
  • 6
  • 35
  • 54
58
votes
4 answers

Push branches to Git

I have a local repository I'm working on and its remote is hosted on GitHub. I recently created a branch and started working on it, making several commits and now wish to push the branch to GitHub and be able to pull it to another cloned repository.…
PHLAK
  • 22,023
  • 18
  • 49
  • 52
56
votes
5 answers

How do I resolve a conflict after git pull?

I have to solve some conflict after a git pull. $ git pull CONFLICT (rename/add): Renamed vignette_generator_mashed.h->vision_problem_8.h in 49423dd0d47abe6d839a783b5517bdfd200a202f. vision_problem_8.h added in HEAD Added as…
Tim
  • 1
  • 141
  • 372
  • 590
53
votes
7 answers

GIT pull error - remote object is corrupted

$ git pull remote: fatal: object 21f3981dd35fccd28febabd96f27241eea856c50 is corrupted error: git upload-pack: git-pack-objects died with error. fatal: git upload-pack: aborting due to possible repository corruption on the remote side. remote:…
Senthil A Kumar
  • 10,306
  • 15
  • 44
  • 55
52
votes
2 answers

Resolve merge conflicts: Force overwrite all files

I am working on a git repository by myself (so yes, I know the implications and the warnings of doing this) and somehow one of the trees got a commit after being pushed when it shouldn't have. Now I'm trying to pull back and it's complaining about…
Qix - MONICA WAS MISTREATED
  • 14,451
  • 16
  • 82
  • 145
45
votes
2 answers

git pull analogous to / opposite of git push -f?

Sometimes, esp. when I'm the only one working on a remote repository, I like rewriting the history with git rebase -i and git push origin master -f. How do I do a forced git pull origin master without a merge? I tried it with the -f option, but that…
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
44
votes
4 answers

Pull is not possible because you have unmerged files, git stash doesn't work. Don't want to commit

I just want to pull. I have changes to disregard, my Gemfile and Gemlock files and I'd be happy to just overwrite them and just pull. I tried stashing my changes away, this didn't work out for me. What do I do? git pull M Gemfile U …
JZ.
  • 21,147
  • 32
  • 115
  • 192
44
votes
3 answers

Git merge flattening

If I am working in multiple branches on a single feature, I use git pull branch1 branch2 branch3 to pull all the changes into my master branch. However, all the commit logs of each branch are copied as well. How do I flatten the commit log down to a…
Verhogen
  • 27,221
  • 34
  • 90
  • 109
44
votes
3 answers

git stash and apply

I'm new to git and not quite clear on how stashing works. Let's say I'm working on branch master and try to git pull and receive the error that my local changes would be overwritten and need to be stashed or committed. If I haven't staged any of my…
neridaj
  • 2,143
  • 9
  • 31
  • 62
43
votes
3 answers

How to set default remote in git?

I have multiple remotes in my git repository. If I execute git pull, then it asks for the password of one of my colleagues. How can I change the remote to black?
Black
  • 18,150
  • 39
  • 158
  • 271
42
votes
14 answers

How to solve the requested URL returned error: 403 in git repository

I have multiple accounts in git I committed code three weeks back with this account. I'll unable to pull my code . I was getting The requested URL returned error: 403 I'll try Pushing to Git returning Error Code 403 fatal: HTTP request failed …
Kondal
  • 2,870
  • 5
  • 26
  • 40
42
votes
13 answers

Files not updating using 'git pull'

I am using Git to cooperate with other users, but today I cannot get the latest change on some files using "git pull", and I cannot see the changes in "git log". What could be the issue?
cao lei
  • 891
  • 1
  • 9
  • 19
41
votes
8 answers

Updating pull request after review changes commit doesn't show up in the pull request

I forked a GitHub repository and made some changes on my fork and submited a pull request but the owners of the original GitHub repository asked for some changes which they asked me for in the pull request. I assumed that adding additional changes…
user2924482
  • 8,380
  • 23
  • 89
  • 173
39
votes
5 answers

git pull origin master does not update origin/master?

According to the documentation, git pull performs a git fetch then a git merge, however in that case performing git pull origin master should perform a git fetch origin master right? However, it does not appear to be doing so. Here is an…
Kenneth Baltrinic
  • 2,941
  • 2
  • 28
  • 45
39
votes
1 answer

Pulling from Git fails and gives me following error: client_global_hostkeys_private_confirm: server gave bad signature for RSA key 0

I am working on a project with my teammates. Some weeks ago, I pulled the project from git successfully. But today when I wanted to pull the updated project via the command "git pull origin ", it gave me the following…
Mohsen Arab
  • 435
  • 1
  • 4
  • 5