記載いただいた内容を見る限り、EC2 側の変更は未コミットの状態で git pull origin master
を実行したということですかね。
Aborting と書かれているとおり、操作が中断されて、特に何も起きていないとおもいます。
EC2 側の変更がコミット済みでコンフリクトが発生した場合は次のような出力になります。
* branch master -> FETCH_HEAD
Auto-merging README.md
CONFLICT (content): Merge conflict in README.md
Automatic merge failed; fix conflicts and then commit the result.
状況確認
git status
を実行してみて状況を確認してください。
次のように both modified
となっていたらコンフリクトしています。
ただの modified ならコンフリクトはしていないです。
sh
1$ git status
2On branch master
3Your branch and 'origin/master' have diverged,
4and have 1 and 1 different commits each, respectively.
5 (use "git pull" to merge the remote branch into yours)
6
7You have unmerged paths.
8 (fix conflicts and run "git commit")
9 (use "git merge --abort" to abort the merge)
10
11Unmerged paths:
12 (use "git add <file>..." to mark resolution)
13 both modified: README.md
14
15no changes added to commit (use "git add" and/or "git commit -a")
コンフリクトしていない 場合の出力は次のようになります。
sh
1$ git status
2On branch master
3Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
4 (use "git pull" to update your local branch)
5
6Changes not staged for commit:
7 (use "git add <file>..." to update what will be committed)
8 (use "git restore <file>..." to discard changes in working directory)
9 modified: README.md
10
11no changes added to commit (use "git add" and/or "git commit -a")
対応
コンフリクトしていない場合
変更を退避するなどして、何も変更されていない状態にしてから git pull origin master
を実行する。
コンフリクトしている場合
目的に応じてどちらか一方を実行してください。
EC2 上の状態を origin/master に一致させたいなら git reset --hard origin/master
を実行してください。
EC2 上の状態を git pull origin master
の実行前にもどしたいなら
git reset --hard ORIGIN_HEAD
を実行してください。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/12/25 07:42