사소한 Tip과 개념들

푸시 되돌리기, 소스트리 스태시 stash, reset 되돌리기, 깃, 깃헙, git, github

숲별 2022. 12. 13. 21:18
728x90


----푸시 되돌리기
git log --oneline : commit 이력 조회하기


git reset --hard "3f0f6ca745" : 돌아가고 싶은 commit 이후의 commit 삭제하기

 

git push -f origin feature/nayoon-refactor : github 원래대로 돌려놓기
git push -f origin test/tester3

 

 

 

----------reset 되돌리기

git reflog

git reset HEAD@{원하는 번호}

 

 

https://ninano1109.tistory.com/3

 

Git push 취소 방법 (feat. '쫄보의삽질' 블로그 탄생 배경)

아래는 저의 생생한 경험담을 바탕으로 작성한 것 입니다. Github 관리 폴더의 이름을 실수로 변경하고 삭제해버렸다. 작업 후 commit 하려고 아무리 찾아봐도 폴더가 보이지 않았다. 나의 피땀눈물

ninano1109.tistory.com

 

https://inpa.tistory.com/entry/GIT-%E2%9A%A1%EF%B8%8F-git-add-commit-push-%EC%B7%A8%EC%86%8C%ED%95%98%EA%B8%B0-%F0%9F%92%AF-%EC%A0%95%EB%A6%AC-git-reset-restore-clean

 

[GIT] ⚡️ git add / commit / push 취소하기 💯 정리

기존 코드를 날리고 싶지않으면 origin(깃헙)에다가 push를 해놓고 리셋해야 원격서버에 내가 작업한게 남는다. 로컬에선 다 사라지기 때문이다. git add 취소하기 (파일 상태를 Unstage로 변경하기) 아

inpa.tistory.com

 

 

https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=lucy9211&logNo=221453954198 

 

[sourceTree] 스태시 stash 란? stash 하는 방법

안녕하세요 :) 지난 포스팅에서 깃랩에 있는 프로젝트를 소스트리를 이용하여 클론 하는 방법에 대해 포스...

blog.naver.com

 

https://hajoung56.tistory.com/45

 

[GIT] git reset 취소하기

git reset을 하다 보면 reset 하기 이전으로 돌아가야 할 경우가 생깁니다. 그럴 경우 먼저, git reflog를 입력하여 이전 이력들을 조회합니다. git reflog git reflog 명령어에서 reflog는 reference log를 의미합

hajoung56.tistory.com

git reflog 명령어에서 reflog는 reference log를 의미합니다.

이렇게 기존 이력들을 볼 수 있는 이유는, Git에서 커밋, 체크아웃, 머지 등의 이력을 모두 기록하고 있기 때문입니다.

 

깃, 깃헙, git, github

 

'사소한 Tip과 개념들' 카테고리의 다른 글

argument와 parameter 차이점  (0) 2023.03.12
JIRA와 깃허브, 인텔리제이 연동  (0) 2023.01.29
CORS  (0) 2022.12.13
JavaScript 변수 var, let, const 차이점  (0) 2022.12.11
saveAll과 deleteAll(deleteAllInBatch)  (0) 2022.12.09