2019-8-9lesson

Aug 9, 2019

git push origin branch 出现error

git push origin V4 报错:

1
2
3
4
To gitlab.xxx.git
! [rejected] branch -> branch (non-fast-forward)
error: failed to push some refs to 'gitlab.xxx.git'
hint: Updates were rejected because the tip of your current branch is behind

这里表明你的点是behind。

那就 git pull, 但是报错:

1
2
3
4
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>

git pull === git fetch + git merge

这里的意思是要你指明remote 和branch: git pull origin V4

如果要将合并的点rebase 掉,git pull --rebase origin V4