티스토리 뷰

git

git push origin master >> git pull origin master // merge

YG - 96년생 , 강아지 있음, 개발자 희망 2021. 12. 11. 11:22

 

에러 내용

 

git에 올려둔 파일에 README.md를 git 페이지에서 수정한 후  나중에 코드를 수정하고 깃에 올리려고 하니 에러가 났습니다.

 

 

 

 

hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

 

 

인터넷에 검색해보니 

 

git pull origin master 을 하면 된다고 하였다.

 

 

 

이러한 화면이 나오는데 아무리 입력을 해도 동작이 안되어서 다시 검색을 하였습니다..

 

Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.

merge 하려는 이유를 적으라고 나와 있습니다.

이유를 적은 후 ^X 가 무엇인지 또 몰랐었는데 컨트롤 X 라는 뜻이였습니다.

 

merge 하려는 이유를 적은 후 컨트롤 X 를 하게 되면 파일명을 적으라고 하는데 파일명을 정한 뒤 엔터를 누르면 됩니다.

 

 

 

  1. git pull origin master 하기.
  2. merge 하려는 이유 적기
  3. 컨트톨 X 로 파일 저장하기
  4. 파일명 엔터로 저장하기
  5. 다시 git push origin master로 깃에 저장해주기

'git' 카테고리의 다른 글

[Git] git에서 특정 Branch만 clone하는 방법  (0) 2021.10.23
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함