Last active
December 9, 2019 01:47
-
-
Save marcnewport/f4e17bd0c5f22b6d46d2e91659b48add to your computer and use it in GitHub Desktop.
Revisions
-
marcnewport revised this gist
Dec 9, 2019 . 1 changed file with 15 additions and 8 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,16 +1,23 @@ ## Checkout remote branch 1. Fetch the remote branch references ``` git fetch -p ``` 2. Checkout the remote branch ``` git checkout --track origin/remote-branch ``` ## Rename a branch 1. You are on the branch you want to rename ``` git branch -m new-name ``` 2. Delete the old-name remote branch and push the new-name local branch ``` git push origin :old-name new-name ``` 3. Reset the upstream branch for the new-name local branch ``` git push origin -u new-name ``` -
marcnewport revised this gist
Dec 9, 2019 . 1 changed file with 5 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,8 +1,11 @@ ## Checkout remote branch 1. Fetch the remote branch references `git fetch -p` 2. Checkout the remote branch `git checkout --track origin/remote-branch` ## Rename a branch 1. You are on the branch you want to rename -
marcnewport revised this gist
Dec 9, 2019 . 1 changed file with 5 additions and 5 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,13 +1,13 @@ ## Checkout remote branch 1. Fetch the remote branch references `git fetch -p` 2. Checkout the remote branch `git checkout --track origin/remote-branch` ## Rename a branch 1. You are on the branch you want to rename `git branch -m new-name` 2. Delete the old-name remote branch and push the new-name local branch `git push origin :old-name new-name` 3. Reset the upstream branch for the new-name local branch `git push origin -u new-name` -
marcnewport revised this gist
Dec 9, 2019 . No changes.There are no files selected for viewing
-
marcnewport revised this gist
Dec 9, 2019 . 1 changed file with 12 additions and 22 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,23 +1,13 @@ ## Checkout remote branch 1. Fetch the remote branch references `git fetch -p` 2. Checkout the remote branch `git checkout --track origin/remote-branch` ## Rename a branch 1. You are on the branch you want to rename `git branch -m new-name` 2. Delete the old-name remote branch and push the new-name local branch `git push origin :old-name new-name` 3. Reset the upstream branch for the new-name local branch `git push origin -u new-name` -
marcnewport revised this gist
Dec 9, 2019 . 1 changed file with 19 additions 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 @@ -1,5 +1,23 @@ ### Checkout remote branch Fetch the remote branch references ``` git fetch -p ``` Checkout the remote branch ``` git checkout --track origin/remote-branch ``` ### Rename a branch You are on the branch you want to rename ``` git branch -m new-name ``` Delete the old-name remote branch and push the new-name local branch ``` git push origin :old-name new-name ``` Reset the upstream branch for the new-name local branch ``` git push origin -u new-name ``` -
marcnewport created this gist
Dec 9, 2019 .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,5 @@ ## Checkout remote branch ``` git fetch -p git checkout --track origin/remote-branch ```