에러처리
[Git] git merge --no-ff Xcode 에러 해결하기
moonkey
2023. 2. 4. 20:57
Merge branch 'cssStyle'
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
Git merge
git에서 작업을 하던 브랜치에서 main 브랜치에 병합하게 될 경우 fast-forward 방식과 non-fast-forward 방식이 있다. 위 에러는 non-fast-forward 방식으로 병합을 하는데 사용하는 VSCode에서 나타난 에러이다. 아무런 키를 눌러도 동작하지 않아서 방법을 찾아보았다.
해결방법
- i 키를 누른다.
- merge를 위한 커밋 메세지를 입력한다.
- esc 버튼을 누른다.
- :wq를 입력한다.
- enter 키를 누른다.
위에 에러에서 Merge branch 'cssStyle' 이 부분이 커밋 메세지를 입력하는 부분이고 커밋 메세지가 따로 필요 없다면 4번부터 진행하면 아래와 같이 기본 커밋 메세지로 merger가 완료된다.
참고
Please enter a commit message to explain why this merge is necessary, especially if it merges an updated upstream into a topic b
I am using Git. I did a pull from a remote repo and got an error message: Please enter a commit message to explain why this merge is necessary, especially if it merges an updated upstream into a
stackoverflow.com