생각기록

git err : Your local changes to the following files would be overwritten by checkout 본문

SeSAC 풀스택/git관련

git err : Your local changes to the following files would be overwritten by checkout

끼록관 2023. 2. 20. 20:11

 Your local changes to the following files would be overwritten by checkout

 

라는 오류가 떠서

 

 



JMK@DESKTOP-SRR4HMV MINGW64 ~/Desktop/용산 2차 반달이/bandari (20230219_)
$ git checkout develop
error: Your local changes to the following files would be overwritten by checkout:
        client/src/components/Card.js
        client/src/components/EditUserInfoModal.js
        client/src/components/SellCategory.js
        client/src/routes/SellPage.js
Please commit your changes or stash them before you switch branches.
Aborting



JMK@DESKTOP-SRR4HMV MINGW64 ~/Desktop/용산 2차 반달이/bandari (20230219_)
$ git stash
Saved working directory and index state WIP on 20230219_arum: 417d8d8 Merge pull request #57 from jihyang1106/user

 

 

 

https://rateye.tistory.com/1143

 

git pull 실행 취소, 저장소를 이전 상태로 가져 오는 방법

질문 : git pull 실행 취소, 저장소를 이전 상태로 가져 오는 방법 내 소스 / 리포지토리가 git pull을 수행하기 전의 이전 상태가되도록 git pull을 되돌 리거나 실행 취소하는 방법이 있습니까? 내가

rateye.tistory.com

처음글을 보고 아무생각없이 git stash 함

그리고 아무생각없이 pull을 받으니.. 당연히 내 코드가 날라가지!!!!!!!!!!!!!!

 

같은 팀원이 

git stash apply

해보고 확인해보라고하니 코드가 다시 살아났고

 

여기서 똑같이 에드 커밋 푸쉬 하라고 했다..!!

 

ㅜㅜ... 함부로 pull받지마라!!!!!!!!!!!

https://gmlwjd9405.github.io/2018/05/18/git-stash.html

 

[Git] git stash 명령어 사용하기 - Heee's Development Blog

Step by step goes a long way.

gmlwjd9405.github.io