Forked from zkiraly/procedure-to-archive-git-branches.md
Last active
August 23, 2018 12:25
-
-
Save hhebig/664fcc4456b68bccf90f80f0de70b2d6 to your computer and use it in GitHub Desktop.
Revisions
-
hhebig revised this gist
Aug 23, 2018 . 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 @@ -3,9 +3,9 @@ ## Discover unwanted branchs From http://www.darkcoding.net/software/cleaning-up-old-git-branches/ 1. Switch to the main branch: git checkout master 2. Get a list of fully merged branches: -
zkiraly revised this gist
May 3, 2014 . 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,9 +1,9 @@ # How to prune unwanted git branches ## Discover unwanted branchs From http://www.darkcoding.net/software/cleaning-up-old-git-branches/ 1. Switch to the main branch, usually 'develop': git checkout develop -
zkiraly revised this gist
May 3, 2014 . 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,9 +1,9 @@ # How to prune unwanted ``git`` branches ## Discover unwanted branchs From http://www.darkcoding.net/software/cleaning-up-old-git-branches/ 1. Switch to the main branch, usually ``develop``: git checkout develop -
zkiraly revised this gist
May 3, 2014 . 1 changed file with 13 additions and 0 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,4 +1,17 @@ # How to prune unwanted git branches ## Discover unwanted branchs From http://www.darkcoding.net/software/cleaning-up-old-git-branches/ 1. Switch to the main branch, usually 'develop': git checkout develop 2. Get a list of fully merged branches: git branch -a --merged ## Prune unwanted branches From http://www.aaronwest.net/blog/index.cfm/2011/6/7/Git-Workflows-Archiving-Old-Branches 1. Tag the unwanted branch: -
zkiraly revised this gist
May 3, 2014 . 1 changed file with 1 addition and 0 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,4 +1,5 @@ # How to prune unwanted git branches From http://www.aaronwest.net/blog/index.cfm/2011/6/7/Git-Workflows-Archiving-Old-Branches 1. Tag the unwanted branch: -
zkiraly revised this gist
May 3, 2014 . 1 changed file with 9 additions and 9 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 @@ -9,14 +9,14 @@ git branch -d sprintjuly2010 3. Push the branch deletion to origin: git push origin :sprintjuly2010 4. Push the new tag to origin: git push --tags 5. Restore a deleted branch from a tag: git checkout -b sprintjuly2010 archive/sprintjuly2010 -
zkiraly revised this gist
May 3, 2014 . 1 changed file with 6 additions and 6 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 @@ # How to prune unwanted git branches 1. Tag the unwanted branch: git tag archive/sprintjuly2010 sprintjuly2010 2. Delete the branch: git branch -d sprintjuly2010 3. Push the branch deletion to origin: ``` git push origin :sprintjuly2010 -
zkiraly revised this gist
May 3, 2014 . 1 changed file with 0 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 @@ -8,17 +8,14 @@ git tag archive/sprintjuly2010 sprintjuly2010 ``` git branch -d sprintjuly2010 ``` 3. Push the branch deletion to origin: ``` git push origin :sprintjuly2010 ``` 4. Push the new tag to origin: ``` git push --tags ``` 5. Restore a deleted branch from a tag: ``` git checkout -b sprintjuly2010 archive/sprintjuly2010 -
zkiraly revised this gist
May 3, 2014 . 1 changed file with 9 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 @@ -10,10 +10,16 @@ git branch -d sprintjuly2010 ``` 3. Push the branch deletion to origin: ``` git push origin :sprintjuly2010 ``` 4. Push the new tag to origin: ``` git push --tags ``` 5. Restore a deleted branch from a tag: ``` git checkout -b sprintjuly2010 archive/sprintjuly2010 ``` -
zkiraly revised this gist
May 3, 2014 . 1 changed file with 6 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,10 +1,13 @@ # How to prune unwanted git branches 1. Tag the unwanted branch: ``` git tag archive/sprintjuly2010 sprintjuly2010 ``` 2. Delete the branch: ``` git branch -d sprintjuly2010 ``` 3. Push the branch deletion to origin: git push origin :sprintjuly2010 -
zkiraly revised this gist
May 3, 2014 . 1 changed file with 0 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,7 +1,6 @@ # How to prune unwanted git branches 1. Tag the unwanted branch: git tag archive/sprintjuly2010 sprintjuly2010 2. Delete the branch: -
zkiraly revised this gist
May 3, 2014 . 1 changed file with 1 addition and 0 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,6 +1,7 @@ # How to prune unwanted git branches 1. Tag the unwanted branch: git tag archive/sprintjuly2010 sprintjuly2010 2. Delete the branch: -
zkiraly created this gist
May 3, 2014 .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,16 @@ # How to prune unwanted git branches 1. Tag the unwanted branch: git tag archive/sprintjuly2010 sprintjuly2010 2. Delete the branch: git branch -d sprintjuly2010 3. Push the branch deletion to origin: git push origin :sprintjuly2010 4. Push the new tag to origin: git push --tags 5. Restore a deleted branch from a tag: git checkout -b sprintjuly2010 archive/sprintjuly2010