Question

I am having issue with git pull.I have commited my changes in local repo. When I do git status I do get a message saying "Your branch is ahead of 'origin/cherryPick' by 1 commit". When I try to pull from remote repository I get a message saying "Already up-to-date.".I think Iam missing some fundamental point.I have pasted the log below of all the 3 commands

wh-test $ git branch -a
alternate

* cherryPick

  master

 new

  squashBranch

  testBranch

  remotes/origin/HEAD -> origin/master

  remotes/origin/cherryPick

  remotes/origin/master

  remotes/origin/testBranch

 git status
# On branch cherryPick

# Your branch is ahead of 'origin/cherryPick' by 1 commit.
#

git pull origin cherryPick

From ssh://xxxx.dyndns.org/home/shopapp/wh-test

 * branch            cherryPick -> FETCH_HEAD

Already up-to-date.

Any help would be appreciated

Was it helpful?

Solution

I'd say conceptually, the fundamental point you're missing is that if you're ahead of the remote repo by one commit, it's the remote repo that's out of date, not you. You need to push your changes to them, not pull, because there's nothing to pull. Chances are you've got all the remotely available commits, so you are indeed up to date.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top