Take a snapshot of the current git repository and zip it
This commit is contained in:
parent
017fa5b258
commit
bc7b1c386a
1 changed files with 11 additions and 0 deletions
11
.bashrc
11
.bashrc
|
|
@ -197,6 +197,17 @@ function git_ignore()
|
|||
git ls-files --other --exclude-standard >> .gitignore
|
||||
}
|
||||
|
||||
# Take a snapshot of the current git repository and zip it.
|
||||
# The archive file name has the current date in its name.
|
||||
function git_archive()
|
||||
{
|
||||
today=`date --iso-8601`
|
||||
project=$(basename $(pwd))
|
||||
name=${project}_${today}
|
||||
git archive --prefix=$name/ --format zip master > $name.zip
|
||||
echo $name.zip
|
||||
}
|
||||
|
||||
#################
|
||||
# Configuration #
|
||||
#################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue