複数のコミット(既にorigin/masterにプッシュされている)からコミットしようとしています。GIT rebase - 複数のコミットを履歴に残す
私はこのチュートリアルからそれをしようとしています: https://feeding.cloud.geek.nz/posts/combining-multiple-commits-into-one/
$ git log --oneline
c172641 Fix second file
24f5ad2 Another file
97c9d7d Add first file
we can combine the last two commits (c172641 and 24f5ad2) by rebasing up to the first commit:
$ git rebase -i 97c9d7d
and specify the following commands in the interactive rebase screen:
pick 24f5ad2 Another file
squash c172641 Fix second file
which will rewrite the history into this:
$ git log --oneline
1a9d5e4 Another file
97c9d7d Add first file
Iが原点/マスターにプッシュされるまでこれが、良い作品。
$ git pull
$ git push origin master
$ git log --oneline
RESULT IS:
******* Merge branch master...
******* THAT REBASE name...
c172641 Fix second file
24f5ad2 Another file
97c9d7d Add first file
しかし、私はこの結果をしたい:
$ git log --oneline
1a9d5e4 Another file
97c9d7d Add first file
が可能ということですか?
"a dog"の助けを借りてください: 'git log --all --decorate --oneline --graph'を実行してください。マージ後に「すべて」の部分を省略することができます。 * 'git pull' *を使用しないでください。まず' git fetch'を使い、次にDOG、* then * merge * if * DOGがOKだと言うことを覚えておいてください。 :-) – torek