💻 Git Rebase
git push
를 끝낸다. 📎 Git commit 하는 방법
git rebase -i master || (main)
i
insert
pick AAAA BBBB
s CCCC DDDD
i
inserts
로 수정s
는 squash
= use commit, but meld into previous commitESC
:wq
종료git push origin [branch name]
git push origin [branch name] -f
-f
:force 명령어를 넣어 하나로 정리noop
이 나왔다.noop
# Rebase c947bec..7e259d3 onto c947bec
#
# 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 <cmd>, exec <cmd> = Run a shell command <cmd>, and stop if it fails
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
noop
Solution// git rebase -i HEAD~Number
git rebase -i HEAD~7
~Number
number 자리에 커밋 범위를 입력
rebase -i
without a commit range will not display any commits. to rebase the last, say, 7 commits use the following:
E.O.D
출처:
많은 도움이 되었습니다. 감사합니다.