Home > Software design >  git new branch, points to previous one
git new branch, points to previous one

Time:12-18

I am creating new branch from develop:

git checkout -b new-branch

then when running status command I see:

On branch new-branch Your branch is ahead of 'develop' by 2 commits.

why its pointing to develop ? Even my zsh shows it weird:

new-branch:develop

git push does not work, it shows that my branch is update to date, but git push origin really pushes to new-branch. Not sure that had happened.

CodePudding user response:

ok I found the answer, few days ago I did:

git config --global branch.autosetupmerge true

which is causing this..

just rolledback it to

git config --global branch.autosetupmerge false

and no issues at all

CodePudding user response:

If git pull no work, try first git fetch. (Optionally, try git fetch -p, -p = before fetching, remove any remote-tracking references that no longer exist on the remote).

Fetch is a primary command used to download contents from a remote repository.

Then execute git pull, and everything would be working again.

  •  Tags:  
  • git
  • Related