cp -rpv backup-original backup-clone
git rebase -i master 해당브랜치이름
git reflog
git reset --hard 돌아가고싶은 주소
이다.
--squash 작업--
pick b91e257 first commit
pick 0118d46 second commit => s 0118d46 second commit
pick 1f199b7 third commit => s 1f199b7 third commit
# Rebase db078da..1f199b7 onto db078da (3 commands)
#
# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup <commit> = like "squash", but discard this commit's log messag
--- 통합된 최종커밋본의 커밋 메시지 작성하기 ---
# This is a combination of 3 commits.
# This is the 1st commit message:
first commit
# This is the commit message #2: => Fix Squash Task
second commit
# This is the commit message #3:
third commit
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Date: Mon Apr 20 14:42:26 2020 +0900
#
# interactive rebase in progress; onto db078da
# Last commands done (3 commands done):
# squash 0118d46 second commit
git push origin 브랜치이름 -f
잘 보고 갑니다