Advertisement
Guest User

Untitled

a guest
Apr 8th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. cd ~/project
  2.  
  3. rm -rf .git
  4. rm my.txt x.txt
  5. git init
  6. printf "A\n\n" > my.txt
  7. git add my.txt
  8. git commit -m A
  9.  
  10.  
  11. git checkout -b x
  12. printf "X\n\n" > x.txt
  13. git add x.txt
  14. git commit -m X
  15.  
  16. printf "Y\n\n" > x.txt
  17. git add x.txt
  18. git commit -m Y
  19.  
  20. git checkout master
  21.  
  22. printf "B\n\n" >> my.txt
  23. git commit -am B
  24.  
  25. git checkout -b feature
  26.  
  27. gsed -i 's/B/C/g' my.txt
  28. git commit -am C
  29.  
  30. gsed -i 's/C/D/g' my.txt
  31. git merge -m D x --no-commit
  32. printf "MERGED\n\n" > x.txt
  33. git add x.txt
  34. git commit --no-edit
  35.  
  36. gsed -i 's/D/E/g' my.txt
  37. git commit -am E
  38.  
  39. git checkout master
  40. printf "F\n\n" >> my.txt
  41. git commit -am F
  42. printf "G\n\n" >> my.txt
  43. git commit -am G
  44.  
  45.  
  46. git checkout feature
  47. git branch feature-old feature
  48.  
  49. git rebase master -p
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement