
状況
gitで別のブランチで作業しているときに、
最新のブランチを更新したから取り込んでおいて―
っていうとき。

最新のブランチ取り込み方わかんねーし、今の作業コードに変にブランチをマージしたらおかしくなりそう
これでやってます
- 作業ブランチで git stash
- 作業ブランチからmaster(最新のブランチ)のブランチに移動。
- git pull
- 作業ブランチに移動
- git merge –no-ff [取り込みたいブランチ] で作業ブランチを最新へ
- git stash apply でstashを元に戻す
参考サイト:
https://yu8mada.com/2018/08/15/the-difference-between-the-git-merge-options-ff-no-ff-and-ff-only/#content-2
コメント