gitを使ったマージのメモ
gitで個人的に管理しているファイルを、他の人があるタイミングで持っていって、その編集結果をマージする、という作業をしたので、覚書としてメモ。
git log でマージ元を特定
$ git log
0e23211f702f84a5ecd7c0aa765760a21043f020 だった。
$ git checkout 0e23211f702f84a5ecd7c0aa765760a21043f020
$ git branch feature-foo
$ git co feature-foo
$ mv ~/newfile file
$ git add file
$ git commit
$ git co master
git logでfeature-fooのcommitを特定
$ git log feature-foo
f2c5783be1357e7fb3295304c91e391f42404042 だった。
$ git merge f2c5783be1357e7fb3295304c91e391f42404042
ブランチの削除
$ git branch -d feature-foo
push
$ git push