ポイント
- 実際にマージを、安全に、行ってみることでコンフリクト発生を調べる。
git merge --no-commit <branch>: 現在のブランチに指定ブランチをマージしステージングを行うが、コミットはしない。git merge --abort: マージを取り消し、マージ前の状態にステージングと作業ディレクトリを戻す。
実践
$ # 現在のブランチに指定ブランチをマージしステージングを行うが、コミットはしない。
$ git merge --no-commit feature1
Automatic merge went well; stopped before committing as required
$ git status
On branch feature2
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
Changes to be committed:
modified: project/class/view/login.php
... 略 ...
$ # マージを取り消し、マージ前の状態にステージングと作業ディレクトリを戻す。
$ git merge --abort
$ git status
On branch feature2
nothing to commit, working directory clean
$
おわりに
次のページが参考になりました!ありがとう存じます♪
以上です。
