1
我重置我的本地develop
分支到後面的幾個提交,並且想推動本地develop
分支到它的遠程,以便遠程的HEAD現在也重置爲少數提交後面。硬重置遠程分支到後面的幾個提交
換句話說,我不喜歡這樣:
UserName path/ (develop)
$ git reset --hard {CommitIdOfAFewCommitsBehind}
Your branch is behind 'origin/develop' by 14 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working tree clean
$ git push origin develop
To https://github.devtools.merrillcorp.com/Javelin/wopi-poc.git
! [rejected] develop -> develop (non-fast-forward)
error: failed to push some refs to 'https://github/repo.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
如何使遙控器還去提交ID我想要的嗎?
9分鐘到一個綠色的checkie。 –