0
我嘗試了「合併--no提交」,和--no提交被忽略。爲什麼?Git的片狀行爲 - 沒有提交?
這裏到底發生了什麼:
[email protected] MINGW64 /c/repos/mobile-solutions (feature/create-new-theme)
$ git status
On branch feature/create-new-theme
Your branch is behind 'origin/feature/create-new-theme' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
[email protected] MINGW64 /c/repos/mobile-solutions (feature/create-new-theme)
$ git merge --no-commit origin/feature/create-new-theme
Updating 0010daa..d835f24
Fast-forward
.../Views/CarrierAccountLines/CarrierAccountLineMenu.cshtml | 3 +--
src/Max.Web/wwwroot/master/sass/app2/custom/all.scss | 6 ++++++
2 files changed, 7 insertions(+), 2 deletions(-)
[email protected] MINGW64 /c/repos/mobile-solutions (feature/create-new-theme)
$ git status
On branch feature/create-new-theme
Your branch is up-to-date with 'origin/feature/create-new-theme'.
nothing to commit, working directory clean
我希望沒有承諾進行。我誤解了什麼?
我不理解。在我提交合並命令之前,它說我跟蹤分支是「1」。合併後它說我的分支是「最新的」。如何才能做出這種轉變......而不用創建一個提交?換言之,合併命令是否改變了我的分支上的某些東西,或者它是否改變了我的分支上的某些東西?如果它確實改變了某些事情,那麼肯定會有提交,對嗎?如果它沒有改變什麼,那它現在如何表明它是「最新的?」 –
https://ariya.io/2013/09/fast-forward-git-merge – Makoto
我想你(或文檔)所說的是快進不作提交......正是因爲提交已經「快速發展」了。也就是說,它只是附加了事先提交的提交。因此,可以說沒有創建「新的提交」......儘管這有點不切實際,因爲目標分支確實被修改了。我正確理解這一點嗎? –