Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cd ~/project
- rm -rf .git
- rm my.txt x.txt
- git init
- printf "A\n\n" > my.txt
- git add my.txt
- git commit -m A
- git checkout -b x
- printf "X\n\n" > x.txt
- git add x.txt
- git commit -m X
- printf "Y\n\n" > x.txt
- git add x.txt
- git commit -m Y
- git checkout master
- printf "B\n\n" >> my.txt
- git commit -am B
- git checkout -b feature
- gsed -i 's/B/C/g' my.txt
- git commit -am C
- gsed -i 's/C/D/g' my.txt
- git merge -m D x --no-commit
- printf "MERGED\n\n" > x.txt
- git add x.txt
- git commit --no-edit
- gsed -i 's/D/E/g' my.txt
- git commit -am E
- git checkout master
- printf "F\n\n" >> my.txt
- git commit -am F
- printf "G\n\n" >> my.txt
- git commit -am G
- git checkout feature
- git branch feature-old feature
- git rebase master -p
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement