-
-
Save nushio3/25a416937b179f393f5c to your computer and use it in GitHub Desktop.
Git for Windowsでコンフリクト解決するときの手順
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OPEN SHELLを選択 | |
git statusを入力、エンター | |
both modified: ファイル名 | |
と、コンフリクトを起こしているファイル名が表示されるので、 | |
エディタ(メモ帳は改行が反映されてないので出来ればそれ以外、Sublime、Terapadなど)で開く | |
<<<<<<<<<<<<と | |
============と | |
>>>>>>>>>>>>が | |
ファイル上に追記されているので、 | |
上下で比較しつつ修正し、 | |
<<や==、>>も消す。 | |
そのあと、 | |
git add . と入力。 | |
そのご、 | |
git rebase --continueと入力すると、 | |
コンフリクトンが解決する | |
あるいは、 | |
Applying: なんとか、 | |
No changes - did you forget to use 'git add'? | |
みたいなことを言われたら、修正後にGithubが保持するデータに結果的になっており、再コミットが必要ない状態なので、 | |
git rebase --skipと入力し、rebase画面を抜ける | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment