# Create a tag for the branch that you want to archive.
# This allows to restore the branch later.
git tag archive/<branchname> <branchname>
# Push the newly created tag.
git push --tags
# Delete the branch
git branch -D <branchname>
# Push the deleted branch
git push origin :<branchname>
Created
May 26, 2023 06:10
-
-
Save floriankapaun/b2ed0933ec678fb634a0b76b9d264074 to your computer and use it in GitHub Desktop.
Archive Git Branch
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment