git 첫 번째 커밋 메세지 수정
- 첫 번째 커밋메세지 내용을 수정하려고 했고 로컬에서만 작업한 상태라서 rebase하기로 했다. 보통 쓰던대로
git rebase -i HEAD~n
을 썼는데 invalid upstream 'HEAD~6'
라는 에러메세지가 나왔다. root까지 가는 방법은 아래 명령어가 있었다.
git rebase -i --root
Git rebase
~숫자
$ git rebase -i HEAD~3
^^(숫자)
$ git rebase -i HEAD^^
pick XXXXXXX Task 1/3
pick XXXXXXX Task 2/3
pick XXXXXXX Task 3/3
# 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
pick XXXXXXX Task 1/3
s XXXXXXX Task 2/3
s XXXXXXX Task 3/3
# 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
Get 강제 Push
git push -f origin develop
Get 강제 Pull
git fetch --all
git reset --hard origin/develop
git pull origin develop
Git commit 취소