ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Git commit id로 과거 시간여행
    카테고리 없음 2022. 2. 5. 21:58

    Git commit id 이용해서 들락날락거리기

    1.    Commit Id 를 알아낸다.
    Terminal -> git log
    Github site -> insights

    2.    이동하기.
    git checkout <commit id>
    (이때, commit id 일부를 가진 branch 로 이동된다. )

    3.A   이동한 후 작업 , 저장하고싶을 때
    git switch -c <branch name>
    git add, commit, push 도 차례로 해주면 된다.

    3.B   저장하고싶지 않을 때
    git stash

Designed by Tistory.