참고: https://wellbell.tistory.com/43
git config --list
git config --global user.email "내 이메일 주소"
git config --global user.name "내 닉네임"
git log --pretty=format:"%h = %an , %ar : %s" --graph
git rebase -i --rebase-merges 해쉬코드
vim 창이 뜨면 i(insert)를 입력하고 누락된 commit 기록을 pick에서 edit로 수정해준다.
수정 후 esc를 누르고 :wq! 를 입력하여 창 나오기
commit 하기 - 이름: user.name, 이메일: user.email
git commit --amend --author="본인 이름 <본인 이메일>"
ex) git commit --amend --author="wooryung <wooryung1004@naver.com>"
vim 창이 떴을 때 commit 내용을 수정하고 싶다면 i 입력 후 수정, esc → :wq!
수정할 내용이 없다면 esc → :wq!
다음 대상을 commit 하기 위해
git rebase --continue
commit 할 개수 만큼 6~8 반복
commit이 모두 완료되면 강제 push
git push origin +브랜치이름
ex) git push origin +master
local의 default branch와 git의 default branch가 같은지 확인 후 다르다면 바꿔줘야 한다.
제가 원래 벨로그 댓글 거의 안 남기는데 이 글 덕분에 사라진 잔디를 복구해서,,,, 감동받았습니다 감사합니다!