Programming/Old
002. [Github] 충돌, 싱크, 커밋 실패 시 쉘에서 해볼만한 것들
kkennib
2016. 5. 11. 02:35
반응형
자주 발생함에도 불구하고 매번 검색해서 하자니 쓸데없이 시간 소모를 많이 하며 뱅뱅 도는 느낌이다.
어차피 암기도 못할 바에는 빠르고 쉽게 접근할 수 있는 곳에 기록하여 시간 소모를 줄여야지!
시도 1. 리셋
1. git fetch origin
2. git reset --hard origin/master
3. git pull
- Fetch will download everything from another repository, in this case, the one marked as "origin".
- Rest will discard cahnges and revert to the mentioned branch, "master" in repository "origin".
- Pull will just get everything from a remote repository and integrate.
시도 2. 머지
출처 : https://githowto.com/merging_back_to_master
1. git checkout master
2. git merge [brach name]
시도 3. undo
1. git reset --hard [head ID]^
-----------------
이 글은 수시로 작성되어야 하는 글이다.
반응형