Skip to content

Commit 5c85e36

Browse files
committed
Archive a branch.
1 parent 5d57c4f commit 5c85e36

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
* [Show all commits in the current branch yet to be merged to master](https://github.com/git-tips/tips#show-all-commits-in-the-current-branch-yet-to-be-merged-to-master)
5252
* [Rename a branch](https://github.com/git-tips/tips#rename-a-branch)
5353
* [rebases 'feature' to 'master' and merges it in to master ](https://github.com/git-tips/tips#rebases-feature-to-master-and-merges-it-in-to-master)
54+
* [Archive the `master` branch](https://github.com/git-tips/tips#archive-the-master-branch)
5455

5556
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
5657
<!-- @doxie.inject end toc -->
@@ -359,5 +360,10 @@ git branch -m [<old-branch-name>] <new-branch-name>
359360
git checkout feature && git rebase @{-1} && git checkout @{-2} && git merge @{-1}
360361
```
361362

363+
## Archive the `master` branch
364+
```sh
365+
git archive master --format=zip --output=master.zip
366+
```
367+
362368
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
363369
<!-- @doxie.inject end -->

tips.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,5 +200,9 @@
200200
{
201201
"title": "rebases 'feature' to 'master' and merges it in to master ",
202202
"tip": "git checkout feature && git rebase @{-1} && git checkout @{-2} && git merge @{-1}"
203+
},
204+
{
205+
"title": "Archive the `master` branch",
206+
"tip": "git archive master --format=zip --output=master.zip"
203207
}
204208
]

0 commit comments

Comments
 (0)