티스토리 뷰

728x90

 

나를 오늘 살리기도 했고, 반쯤 죽이기도 했던 그 명령어 덩장해부렀어

 

신나게 내 이름 바꿔서 잔디밭으로 만들어야쥐~ 하면서
$git log --oneline으로 뽑은 해쉬 값 중 내가 이름을 수정할 해쉬값을 찾아왔지
그리고는 아래 명령어를 실행했어

$ git rebase -i hash주소^

저 주소 마지막에 '^'는 결코 오타가 아녀~
쟤는 선택한 hash의 이전 hash를 가리키는거야
왜 이전이냐? 몰라 나도..

rebase가 지정 hash 초과하는 부분을 긁어오는 것 같더라고 해보니까

 

저걸 딱 하니까 vscode창 하나가 뜨면서 아래 내용이 나오더라?

pick b11111 commit2
pick 123123 commit1

# Rebase 80be237..10aa749 onto 80be237 (2 command(s))
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
# d, drop = remove commit
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out

 

이제 저 pick중에서 최상단에 있는 hash만 e 또는 edit으로 바꿔주고 저장하면 땡이야
망치면 어쩌나 두려움 반, 신남 반 해서 딱 끝냈지


미리 경고하는데, 제발 저 안에 내용 아무것도 건드리지 말고
이름 바꿀 부분만 e나 edit으로 바꾸고 종료해라....
난 과거의 너란다.. 제발...... 지우지마!!!!!!!
이 글을 쓰게 된 이유야 이게!!!

 

 

그럼 이제 아래 문구가 뜨더라고

Stopped at b11111111111111111111111114... commit2
You can amend the commit now, with

	git commit --amend 

Once you are satisfied with your changes, run

	git rebase --continue

 

뭐 또 뜨나 싶어서 기다렸는데 없어
이제 본격적으로 원하는 이름 넣어주는거야

그건 다음 장에서 할꺼임

 

 

 

 

 

 

 

 

  •  
728x90
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/07   »
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
글 보관함