Guest User

Untitled

a guest
May 5th, 2016
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.48 KB | None | 0 0
  1. #!/bin/sh
  2. mkdir testing_git
  3. cd testing_git
  4.  
  5. git init
  6. touch main.txt
  7. git add .
  8. git commit -m "initial commit"
  9.  
  10. # setup B branch
  11. git checkout -b B
  12. echo hello > test.txt
  13. git add .
  14. git commit -m "added test.txt"
  15.  
  16. # setup master
  17. git checkout master
  18. echo hello > test.txt
  19. git add .
  20. git commit -m "added test.txt"
  21. rm test.txt
  22. git add .
  23. git commit -m "remove test.txt"
  24.  
  25. # execute rebase
  26. git checkout B
  27. git rebase master
  28.  
  29. echo "\nSee the result in the testing_git directory"
Advertisement
Add Comment
Please, Sign In to add comment