docs:git:solving_your_branch_is_ahead_problem

solving your branch is ahead problem

If you are using a public repository and have messages where your branch is ahead of 'origin/master' by xx commits, this can be because someone has done a rebase or reset –hard on that branch, thus removing commits. Even a git pull will not update your branch. You can make your branch match the remote like this (substitute master with your branch name if necessary):

git reset --hard origin/master

  HEAD is now at blah blah
  • docs/git/solving_your_branch_is_ahead_problem.txt
  • Last modified: 2009/11/09 16:23
  • by billh