'Git/협업'에 해당하는 글 1건

 

[오류1]

Please commit your changes or stash them before you merge.
Aborting

[해결1]

git stash (local에서 하던 것을 잠시 미뤄두기)

(venv) C:\Users\user\PycharmProjects\DjangoProject\insta>git stash
Saved working directory and index state WIP on master: 6edaaf5 UpdateForm 조금 변경 !

 다시 pull을 해보자!


[오류2]

warning: Cannot merge binary files: db.sqlite3 (HEAD vs. eb7f395a92448ac8dddd762c0c997093207cc88d)
Auto-merging member/forms.py
CONFLICT (content): Merge conflict in member/forms.py
Auto-merging db.sqlite3
CONFLICT (content): Merge conflict in db.sqlite3
Automatic merge failed; fix conflicts and then commit the result.

[해결2]

DB를 지워보자!


[오류3]

(venv) C:\Users\user\PycharmProjects\DjangoProject\insta>git pull
error: Pulling is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.

[해결3] 

1. git status 를 통해 unmerged path를 확인한다.

Unmerged paths:
  (use "git add <file>..." to mark resolution)

        both modified:   member/forms.py

2. git add 파일명

(venv) C:\Users\user\PycharmProjects\DjangoProject\insta>git add member/forms.py

3. git commit am "커밋메시지"

(venv) C:\Users\user\PycharmProjects\DjangoProject\insta>git commit -am "am commit"
[master 2876f19] am commit

(venv) C:\Users\user\PycharmProjects\DjangoProject\insta>git pull
Already up to date.

[결과]

pull 성공 :)

 

 

 

[결론]

git 오류날때 오류 메시지 구글링해서 시키는 대로 해보자! ...ㅎㅎ

 

[참고]

ayong8.tistory.com/entry/git-stash-%EC%A7%81%EA%B4%80%EC%A0%81%EC%9C%BC%EB%A1%9C-%EC%9D%B4%ED%95%B4%ED%95%98%EA%B8%B0

 

git stash: 직관적으로 이해하기

git stash의 직관적 이해 직관적 이해 기본적으로 git stash는 현재 업데이트된 내용을 스택에 치워두는 명령어다 내 로컬의 modified, staged contents들을 (=나의 변경사항을) 스택구조 (한켠에 설정되어

ayong8.tistory.com

jmlim.github.io/git/2019/02/18/git-pull-fail-problem/

 

git merge 후 pull 실패 시 해결 방안 - You have not concluded your merge (MERGE_HEAD exists) · 기억하기 위한 개

커밋을 제대로 하지 않았을 경우 아래 메세지가 뜰 수 있음. Pulling is not possible because you have unmerged files

jmlim.github.io

 


WRITTEN BY
choco-songyi

,