Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cat test.sh
- #!/bin/sh -x
- mkdir test_git
- cd test_git
- git init
- touch a
- git add a
- git commit -a -m 'initial commit'
- git checkout -b 'new_branch'
- echo test >a;
- git commit -a -m 'test changed'
- git checkout master
- echo test2 >a
- git checkout new_branch
- git branch
- -----------------
- $ ./test.sh
- + mkdir test_git
- + cd test_git
- + git init
- Initialized empty Git repository in /tmp/test_git/.git/
- + touch a
- + git add a
- + git commit -a -m 'initial commit'
- [master (root-commit) db718c0] initial commit
- 1 file changed, 0 insertions(+), 0 deletions(-)
- create mode 100644 a
- + git checkout -b new_branch
- Switched to a new branch 'new_branch'
- + echo test
- + git commit -a -m 'test changed'
- [new_branch c4037f9] test changed
- 1 file changed, 1 insertion(+)
- + git checkout master
- Switched to branch 'master'
- + echo test2
- + git checkout new_branch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement