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

Why does git log not show anything new after git fetch?

I am learning about working with Git remotes by reading the relevant section of the Pro Git Book. If you clone a repository, the command automatically adds that remote repository under the name "origin". So, git fetch origin fetches any new work…
Adil
  • 2,418
  • 7
  • 34
  • 38
22
votes
1 answer

Can't "pull" with smartgit, "fetch only" is available

I use SmartGit as a GUI for git. But so far, I always have the same problem. In my projects (all of them), I can't pull, the button is disabled, it's only the "fetch only" button which is available. But if I run the command git pull origin master it…
Tancrede Chazallet
  • 7,035
  • 6
  • 41
  • 62
21
votes
6 answers

Git push/pull between team members local repositories

Lets say there is a team with 4 developers. We also have a central repository for our project. Developers push and pull from central repository. Here(in Decentralized but centralized section) it says that its possible to push/pull between team…
nyzm
  • 2,787
  • 3
  • 24
  • 30
21
votes
5 answers

The operation could not be performed because "PROJECTNAME" has one or more tree conflicts

I am using Git and when I tried to pull a newer development branch with my current branch using XCode's source control menu I received this error message: The operation could not be performed because "ProjectName" has one or more tree…
Tony Pham
  • 393
  • 1
  • 3
  • 9
20
votes
2 answers

Git Pull Aborting

My colleague merged some change for a production hotfix into his local master branch and then did a push of master to our GitHub repository. Now I'm try to update my local master branch with his changes. When a do a "git pull origin" from the git…
sisdog
  • 2,649
  • 2
  • 29
  • 49
19
votes
2 answers

Git says local branch is ahead of remote after having pulled from remote

I’m sorry if the title isn’t clear, but this is a weird problem. I git checkout to my "stage" branch and git pull to get my partner’s latest changes (which he pushed last night to the "stage" branch on the remote repository), and sure enough, they…
Alfonso
  • 2,166
  • 3
  • 16
  • 15
19
votes
2 answers

Git push only for bare repositories?

When I tried 'git push origin master' to remote repository on my external disk, git warning occured stating that pusing to checkout repository will in next releases of git refused by default. On external disk I have checkouted project and I want to…
miki
  • 241
  • 1
  • 2
  • 3
19
votes
1 answer

Where are the pull/push commands in GitHub for Windows client?

I've been using GitHub for Mac for a while and was about to help a colleague install it on Windows. I cannot find any menu or any button to initiate "push" or "pull" as I can on Mac. Only way I see it is to open a shell and execute git pull. But…
Andreas Norman
  • 999
  • 1
  • 9
  • 19
19
votes
3 answers

Git pull.rebase this is a possibly dangerous operation

In the git-config documentation the information about pull.rebase: pull.rebase When true, rebase branches on top of the fetched branch, instead of merging the default branch from the default remote when "git pull" is run. See "branch..rebase"…
erkfel
  • 1,588
  • 2
  • 17
  • 29
19
votes
7 answers

How to fix git repository broken by interrupted git fetch?

If git fetch gets interrupted for example by Ctrl-C or caused by connectivity problems, after that git fetch and also git pull fail to work. user@computer:~/code/openttd-git$ git fetch ^C user@computer:~/code/openttd-git$ git fetch error: Unable to…
nrz
  • 10,435
  • 4
  • 39
  • 71
18
votes
3 answers

Git pulling depends on the current dir

I am trying to git pull some repository via root user from any directory. For example, executing git pull from /root/: #> cd ~ #> sudo -u dmalikov git --git-dir=/home/dmalikov/path/to/repo/.git pull /usr/libexec/git-core/git-sh-setup: line 142:…
18
votes
1 answer

Updating forked GitHub repo to match original's latest code and commits

I forked a GitHub project several days ago and from its issues, I can see that the master branch has had some modifications since. When I cd to my location directory of this project and use git pull, it says, "Already up-to-date". Why? How do I…
wuchang
  • 3,003
  • 8
  • 42
  • 66
17
votes
5 answers

pull-only repo's 'git status' saying the branch is ahead of origin/master. Why?

So here's the situation: $ git status # On branch master # Your branch is ahead of 'origin/master' by [x] commits. # There are several questions about this on SO already, but none seem to specifically address the type of scenario I have. This…
JK Laiho
  • 3,538
  • 6
  • 35
  • 42
17
votes
6 answers

Laravel project missing .env file

I'm new to laravel and i recently pulled a project from git-hub and it wouldn't run because it's missing the .env file i tried composer install but that didn't work. Is there any other way to generate the .env file?
Yohannes Taye
  • 217
  • 1
  • 4
  • 8
17
votes
3 answers

How can I fast-forward a single git commit, programmatically?

I periodically get message from git that look like this: Your branch is behind the tracked remote branch 'local-master/master' by 3 commits, and can be fast-forwarded. I would like to be able to write commands in a shell script that can do the…
Norman Ramsey
  • 198,648
  • 61
  • 360
  • 533