This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(master)jj@im-jj:~/demo$ git checkout -b rc-1.0 -t origin/rc-1.0 | |
Branch rc-1.0 set up to track remote branch rc-1.0 from origin. | |
Switched to a new branch 'rc-1.0' | |
(rc-1.0)jj@im-jj:~/demo$ git remote show origin | |
* remote origin | |
URL: my-server:/git/demo.git | |
HEAD branch: master | |
Remote branches: | |
master tracked | |
rc-1.0 tracked |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(rc-1.0)jj@im-jj:~/demo$ git checkout master | |
Switched to branch 'master' | |
(master)jj@im-jj:~/demo$ git merge rc-1.0 | |
Merge made by recursive. | |
mynewfile.txt | 1 + | |
mynewfile2.txt | 1 + | |
2 files changed, 2 insertions(+), 0 deletions(-) | |
create mode 100644 mynewfile.txt | |
create mode 100644 mynewfile2.txt | |
(master)jj@im-jj:~/demo$ git push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(master)jj@im-jj:~/demo$ git checkout rc-1.0 | |
Switched to branch 'rc-1.0' | |
(rc-1.0)jj@im-jj:~/demo$ git checkout -b 1.0 | |
Switched to a new branch '1.0' | |
(1.0)jj@im-jj:~/demo$ git push origin 1.0 | |
Total 0 (delta 0), reused 0 (delta 0) | |
To my-server:/git/demo.git | |
* [new branch] 1.0 -> 1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(1.0)jj@im-jj:~/demo$ git checkout rc-1.0 | |
Switched to branch 'rc-1.0' | |
(rc-1.0)jj@im-jj:~/demo$ echo 'print "fixing a bug"' >> feature.py | |
(rc-1.0)jj@im-jj:~/demo$ git add -A && git commit -m "Added bug fix" | |
[rc-1.0 52a6d49] Added bug fix | |
1 files changed, 1 insertions(+), 0 deletions(-) | |
(rc-1.0)jj@im-jj:~/demo$ git push | |
Counting objects: 5, done. | |
Delta compression using up to 2 threads. | |
Compressing objects: 100% (3/3), done. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(rc-1.0)jj@im-jj:~/demo$ git checkout 1.0 | |
Switched to branch '1.0' | |
(1.0)jj@im-jj:~/demo$ git merge rc-1.0 | |
Updating 97a0f2a..52a6d49 | |
Fast forward | |
feature.py | 1 + | |
1 files changed, 1 insertions(+), 0 deletions(-) | |
(1.0)jj@im-jj:~/demo$ git push | |
Total 0 (delta 0), reused 0 (delta 0) | |
To my-server:/git/demo.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(1.0)jj@im-jj:~/demo$ git checkout master | |
Switched to branch 'master' | |
(master)jj@im-jj:~/demo$ git merge rc-1.0 | |
Merge made by recursive. | |
feature.py | 1 + | |
1 files changed, 1 insertions(+), 0 deletions(-) | |
(master)jj@im-jj:~/demo$ git push | |
Counting objects: 4, done. | |
Delta compression using up to 2 threads. | |
Compressing objects: 100% (2/2), done. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(master)jj@im-jj:~/demo$ git checkout rc-1.0 | |
Switched to branch 'rc-1.0' | |
(rc-1.0)jj@im-jj:~/demo$ echo '# bugfix1!' >> feature.py | |
(rc-1.0)jj@im-jj:~/demo$ git add -A && git commit -m "Added bugfix number 1" | |
[rc-1.0 92ab376] Added bugfix number 1 | |
1 files changed, 1 insertions(+), 0 deletions(-) | |
(rc-1.0)jj@im-jj:~/demo$ echo '# bugfix2!' >> feature2.py | |
(rc-1.0)jj@im-jj:~/demo$ git add -A && git commit -m "Added bugfix number 2" | |
[rc-1.0 1dec2d3] Added bugfix number 2 | |
1 files changed, 1 insertions(+), 0 deletions(-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(rc-1.0)jj@im-jj:~/demo$ git log --pretty=oneline --abbrev-commit | |
1dec2d3 Added bugfix number 2 # <-- This is the commit we want, note the short-hash. | |
92ab376 Added bugfix number 1 | |
52a6d49 Added bug fix | |
97a0f2a Minor commit | |
099214d Minor commit | |
d0e9912 Issue 12 - Added new feature XYZ | |
c348893 Added fixed typo | |
309291d Initial Commit | |
(rc-1.0)jj@im-jj:~/demo$ git checkout 1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(1.0)jj@im-jj:~/demo$ git log --abbrev-commit --pretty=oneline | |
8e3a5f9 Added bugfix number 2 | |
52a6d49 Added bug fix | |
97a0f2a Minor commit | |
099214d Minor commit | |
d0e9912 Issue 12 - Added new feature XYZ | |
c348893 Added fixed typo | |
309291d Initial Commit | |
(1.0)jj@im-jj:~/demo$ git reset --hard 52a6d49 | |
HEAD is now at 52a6d49 Added bug fix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(rc-1.0)jj@im-jj:~/demo$ git checkout master | |
Switched to branch 'master' | |
(master)jj@im-jj:~/demo$ touch myothernewfile.txt | |
(master)jj@im-jj:~/demo$ git add myothernewfile.txt | |
(master)jj@im-jj:~/demo$ git commit -m "Added another new file" | |
[master 617f46d] Added another new file | |
0 files changed, 0 insertions(+), 0 deletions(-) | |
create mode 100644 myothernewfile.txt | |
(master)jj@im-jj:~/demo$ touch onemorefile.txt | |
(master)jj@im-jj:~/demo$ git add onemorefile.txt |