Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. cat test.sh
  2. #!/bin/sh -x
  3. mkdir test_git
  4. cd test_git
  5. git init
  6. touch a
  7. git add a
  8. git commit -a -m 'initial commit'
  9. git checkout -b 'new_branch'
  10. echo test >a;
  11. git commit -a -m 'test changed'
  12. git checkout master
  13. echo test2 >a
  14. git checkout new_branch
  15. git branch
  16.  
  17.  
  18. -----------------
  19. $ ./test.sh
  20. + mkdir test_git
  21. + cd test_git
  22. + git init
  23. Initialized empty Git repository in /tmp/test_git/.git/
  24. + touch a
  25. + git add a
  26. + git commit -a -m 'initial commit'
  27. [master (root-commit) db718c0] initial commit
  28. 1 file changed, 0 insertions(+), 0 deletions(-)
  29. create mode 100644 a
  30. + git checkout -b new_branch
  31. Switched to a new branch 'new_branch'
  32. + echo test
  33. + git commit -a -m 'test changed'
  34. [new_branch c4037f9] test changed
  35. 1 file changed, 1 insertion(+)
  36. + git checkout master
  37. Switched to branch 'master'
  38. + echo test2
  39. + git checkout new_branch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement