-
-
Save joachimdoerr/386ea1a99f758d35cab9 to your computer and use it in GitHub Desktop.
Revisions
-
canton7 revised this gist
Oct 10, 2011 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ `git clone path/to/test/repo.git` push.default = matching (the default) ==================================== ``` git config push.default matching -
canton7 revised this gist
Oct 8, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -108,7 +108,7 @@ git branch -D origin_test push.default = tracking ======================= (I'm using 1.7.4 msysgit, use push.default upstream for 1.7.6+) `git config push.default tracking` -
canton7 renamed this gist
Oct 8, 2011 . 1 changed file with 17 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,18 +1,21 @@ `git clone path/to/test/repo.git` push.default = matching ======================= ``` git config push.default matching git branch -a * master origin/master origin/test ``` Pushing a tracking branch of the same name ------------------------------------------ ``` git checkout -t origin/test Branch test set up to track remote branch test from origin. Switched to new branch 'test' @@ -28,10 +31,12 @@ git push *Pushes master and test to origin* git branch -D test ``` Pushing a tracking branch of a different name --------------------------------------------- ``` git checkout -b origin_test origin/test Branch origin_test set up to track remote branch test from origin. Switched to new branch 'origin_test' @@ -50,10 +55,12 @@ git push *Pushes master to origin* git branch -D test ``` Pushing a non-tracking branch of the same name ---------------------------------------------- ``` git checkout --no-track -b test origin/test Switched to new branch 'test' @@ -71,10 +78,12 @@ git push *Pushes master and test to origin* git branch -D test ``` Pushing a non-tracking branch of a different name ------------------------------------------------- ``` git checkout --no-track -b origin_test origin/test Switched to new branch 'origin_test' @@ -94,17 +103,19 @@ git push origin *Pushes master to origin* git branch -D origin_test ``` push.default = tracking ======================= (I'm using 1.7.4 msysgit, use push.default upstream for 1.7.6) `git config push.default tracking` Pushing a tracking branch ------------------------- ``` git checkout -t origin/test Branch test set up to track remote branch test from origin. Switched to new branch 'test' @@ -115,10 +126,12 @@ git push *Pushes test to origin* git branch -D test ``` Pushing a non-tracking branch of the same or different name ----------------------------------------------------------- ``` git checkout --no-track -b test origin/test Switched to new branch 'test' @@ -127,4 +140,5 @@ echo eight > test && git add test && git commit -m "Test file 8" git push fatal: No destination configured to push to git push origin fatal: The current branch test is not tracking anything. ``` -
canton7 revised this gist
Jun 29, 2011 . 1 changed file with 25 additions and 12 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -10,8 +10,8 @@ git branch -a origin/master origin/test Pushing a tracking branch of the same name ------------------------------------------ git checkout -t origin/test Branch test set up to track remote branch test from origin. @@ -29,6 +29,28 @@ git push git branch -D test Pushing a tracking branch of a different name --------------------------------------------- git checkout -b origin_test origin/test Branch origin_test set up to track remote branch test from origin. Switched to new branch 'origin_test' echo two_point_one > test && git add test && git commit -m "Test file 2.1" git push *Pushes master to origin* echo two_point_two > test && git commit -am "Test file 2.2" git push origin *Pushes master to origin* echo two_point_three > test && git commit -am "Test file 2.3" git checkout master git push *Pushes master to origin* git branch -D test Pushing a non-tracking branch of the same name ---------------------------------------------- @@ -105,13 +127,4 @@ echo eight > test && git add test && git commit -m "Test file 8" git push fatal: No destination configured to push to git push origin fatal: The current branch test is not tracking anything. -
canton7 created this gist
Jun 29, 2011 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,117 @@ git clone path/to/test/repo.git push.default = matching ======================= git config push.default matching git branch -a * master origin/master origin/test Pushing a tracking branch ------------------------- git checkout -t origin/test Branch test set up to track remote branch test from origin. Switched to new branch 'test' echo one > test git add test && git commit -m "Test file 1" git push *Pushes master and test to origin* echo two > test && git commit -am "Test file 2" git checkout master git push *Pushes master and test to origin* git branch -D test Pushing a non-tracking branch of the same name ---------------------------------------------- git checkout --no-track -b test origin/test Switched to new branch 'test' echo three > test && git add test && git commit -m "Test file 3" git push fatal: No destination configured to push to. git push origin *Pushes master and test to origin* echo four > test && git commit -am "Test file 4" git checkout master git push *Pushes master and test to origin* git branch -D test Pushing a non-tracking branch of a different name ------------------------------------------------- git checkout --no-track -b origin_test origin/test Switched to new branch 'origin_test' echo five > test && git add test && git commit -m "Test file 5" git push fatal: No destination configured to push to. git push origin *Pushes master to origin* echo six > test && git commit -am "Test file 6" git checkout master git push *Pushes master to origin* git push origin *Pushes master to origin* git branch -D origin_test push.default = tracking ======================= (I'm using 1.7.4 msysgit, use push.default upstream for 1.7.6) git config push.default tracking Pushing a tracking branch ------------------------- git checkout -t origin/test Branch test set up to track remote branch test from origin. Switched to new branch 'test' echo seven > test && git add test && git commit -m "Test file 7" git push *Pushes test to origin* git branch -D test Pushing a non-tracking branch of the same or different name ----------------------------------------------------------- git checkout --no-track -b test origin/test Switched to new branch 'test' echo eight > test && git add test && git commit -m "Test file 8" git push fatal: No destination configured to push to git push origin fatal: The current branch test is not tracking anything.