Questions tagged [pull]

In distributed version control, pull or fetch is the action of transferring remote changes into a local repository.

In distributed version control, pull or fetch is the action of transferring remote changes into a local repository.

Examples:

970 questions
887
votes
16 answers

Pull a certain branch from the remote server

Say that someone created a branch xyz. How do I pull the branch xyz from the remote server (e.g. GitHub) and merge it into an existing branch xyz in my local repo? The answer to Push branches to Git gives me the error "! [rejected]" and mentions…
tybro0103
  • 48,327
  • 33
  • 144
  • 170
853
votes
10 answers

How to "git pull" from master into the development branch

I have a branch called "dmgr2" in development, and I want to pull from the master branch (live site) and incorporate all the changes into my development branch. Is there a better way to do this? Here is what I had planned on doing, after committing…
Matthew Colley
  • 10,816
  • 9
  • 43
  • 63
521
votes
35 answers

Your configuration specifies to merge with the from the remote, but no such ref was fetched.?

I am getting this error for pull: Your configuration specifies to merge with the ref 'refs/heads/feature/Sprint4/ABC-123-Branch' from the remote, but no such ref was fetched. This error is not coming for any other branch.The special thing…
Farrukh Chishti
  • 7,652
  • 10
  • 36
  • 60
421
votes
10 answers

How do you attach a new pull request to an existing issue on github?

I'm not sure, but I have a vague memory of creating a github pull request with "Issue 4" or something in the title, and it automatically attached itself to Issue 4 in the project that I was submitting it to. I tried it again recently and it didn't…
Tyler
  • 21,762
  • 11
  • 61
  • 90
338
votes
21 answers

git pull error :error: remote ref is at but expected

Full message: error: Ref refs/remotes/origin/user is at 3636498c2ea7735fdcedc9af5ab3c8689e6abe77 but expected a21359c6cc2097c85775cde6a40105f4bd7100ec From github.com:{github project url} ! a21359c..6273ffc user -> origin/user (unable to update…
Sanjeev Kumar Dangi
  • 6,925
  • 7
  • 28
  • 30
328
votes
12 answers

What is the difference between pull and clone in git?

What is the difference between doing (after mkdir repo and cd repo): git init git remote add origin git://github.com/cmcculloh/repo.git git fetch --all git pull origin master and git clone git://github.com/cmcculloh/repo.git I mean, obviously one…
cmcculloh
  • 47,596
  • 40
  • 105
  • 130
322
votes
19 answers

How do I force Kubernetes to re-pull an image?

I have the following replication controller in Kubernetes on GKE: apiVersion: v1 kind: ReplicationController metadata: name: myapp labels: app: myapp spec: replicas: 2 selector: app: myapp deployment: initial template: …
Torsten Bronger
  • 9,899
  • 7
  • 34
  • 41
315
votes
8 answers

How to undo a git pull?

I would like to undo my git pull on account of unwanted commits on the remote origin, but I don't know to which revision I have to reset back to. How can I just go back to the state before I did the git pull on the remote origin?
Kartins
  • 3,469
  • 3
  • 17
  • 17
302
votes
6 answers

Does "git fetch --tags" include "git fetch"?

A nice and simple question - is the function of "git fetch" a strict sub-set of git fetch --tags? I.e. if I run git fetch --tags, is there ever a reason to immediately run git fetch straight afterward? What about git pull and git pull --tags? Same…
davidA
  • 12,528
  • 9
  • 64
  • 96
298
votes
35 answers

Trying to git pull with error: cannot open .git/FETCH_HEAD: Permission denied

Help me please, I am trying to run this in my terminal: asgard@asgard-A7N8X2-0:~/CollegePortal$ git pull error: cannot open .git/FETCH_HEAD: Permission denied Then I try this one asgard@asgard-A7N8X2-0:~/CollegePortal$ sudo git pull Permission…
Arthur Yakovlev
  • 8,933
  • 8
  • 32
  • 48
288
votes
5 answers

How to merge remote master to local branch

I have a local branch of a project ("configUpdate") that I've forked from somebody else's project and I've done a load of changes on it and would like to merge the changes they've made in to my local branch. I've tried git pull --rebase origin…
Martyn
  • 16,432
  • 24
  • 71
  • 104
260
votes
10 answers

How to pull specific directory with git

I have a project with git, and I just want to clone or pull a specific directory, like myproject/javascript just like subversion does. make some changes, commit and push back again. It's possible?
bluefoot
  • 10,220
  • 11
  • 43
  • 56
242
votes
11 answers

Error: Cannot pull with rebase: You have unstaged changes

I have started collaborating with a few friends on a project & they use the heroku git repository. I cloned the repository a few days ago and they have since made some changes so I am trying to get the latest updates I ran the git pull --rebase…
user3597950
  • 9,201
  • 6
  • 26
  • 35
181
votes
11 answers

Delete local Git branches after deleting them on the remote repo

I want to have my local and remote repositories always in sync in terms of branches. After a Pull Request review on GitHub, I merge and remove my branch there (remote). How could I fetch this information in my local repository and get Git to remove…
sf89
  • 5,088
  • 7
  • 24
  • 27
174
votes
5 answers

Discard all and get clean copy of latest revision?

I'm moving a build process to use mercurial and want to get the working directory back to the state of the tip revision. Earlier runs of the build process will have modified some files and added some files that I don't want to commit, so I have…
Rory
  • 40,559
  • 52
  • 175
  • 261
1
2 3
64 65