[Git] git game - 2 argument rebase, ^ with number

2024. 7. 9. 11:20Git

728x90
반응형
SMALL

git rebase [-i] [destination commit] [source commit]

 

dest commit에 source commit을 정렬하여 정리

 

 

git checkout [object commit((^ | ~)number?)*]

 

HEAD : main -> c3

git checkout HEAD~^2~2

 

 

 


 

git game 정답

 

git rebase -i HEAD bugFix
git rebase -i HEAD side
git rebase -i HEAD another
git branch -f main HEAD

or

git rebase main bugFix
git rebase bugFix side
git rebase side another
git rebase another main

 

 

git checkout HEAD^^2^
git branch bugWork
git checkout main

or

git branch bugWork HEAD^^2^

 

 

git checkout one
git cherry-pick c4 c3 c2
git checkout two
git cherry-pick c5 c4 c3 c2
git branch -f three c2
728x90
반응형
LIST