Takuya Miyashita
This site
Web
Start:
*git pull や git merge を忘れたとき [#h2c60ee7]
例えば,ローカルの master が origin/master より数コミット...
ローカルの master でのコミットはまだ行っていないものとす...
+git stash で現在のローカルの情報を保存
#codeprettify{{
git stash
}}
~
+mergeまたはpull
#codeprettify{{
git fetch origin #既に最新情報の場合 fetch は不要
git merge origin/master
}}
または
#codeprettify{{
git pull origin master
}}
~
+showでstashとの差分を確認する~
showでstashした時と最新のorigin/masterを反映させた現在の...
#codeprettify{{
git show -p
}}
~
+stash pop(stash apply)でstashを現在のmasterに適用する
#codeprettify{{
git stash pop
}}
または
#codeprettify{{
git stash apply [index]
}}
git stash applyのインデックスはgit logで確認する.~
~
+競合の問題などを解決後, add, commit
#codeprettify{{
git add .
git commit -m "commit massage"
}}
~
+競合後修正してstashが削除されていない場合はstashを削除
#codeprettify{{
git stash drop
}}
End:
*git pull や git merge を忘れたとき [#h2c60ee7]
例えば,ローカルの master が origin/master より数コミット...
ローカルの master でのコミットはまだ行っていないものとす...
+git stash で現在のローカルの情報を保存
#codeprettify{{
git stash
}}
~
+mergeまたはpull
#codeprettify{{
git fetch origin #既に最新情報の場合 fetch は不要
git merge origin/master
}}
または
#codeprettify{{
git pull origin master
}}
~
+showでstashとの差分を確認する~
showでstashした時と最新のorigin/masterを反映させた現在の...
#codeprettify{{
git show -p
}}
~
+stash pop(stash apply)でstashを現在のmasterに適用する
#codeprettify{{
git stash pop
}}
または
#codeprettify{{
git stash apply [index]
}}
git stash applyのインデックスはgit logで確認する.~
~
+競合の問題などを解決後, add, commit
#codeprettify{{
git add .
git commit -m "commit massage"
}}
~
+競合後修正してstashが削除されていない場合はstashを削除
#codeprettify{{
git stash drop
}}
Page:
Edit with a page name which already exists