Last active
December 18, 2015 04:19
-
-
Save janosgyerik/5724915 to your computer and use it in GitHub Desktop.
Create a mirror Git repository from an existing Git project directory for the purpose of release management using a post-receive hook
This file contains 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 characters
# go to the directory where the site is deployed | |
cd ~/project/dir | |
# initialize empty Git repo for release purposes | |
git init --bare ~/repos/git/releases/project.git | |
# add the repo as a remote called "releases" | |
git remote add releases ~/repos/git/releases/project.git | |
# create the "beta" branch locally and switch to it | |
git checkout -b beta | |
# push the release branch to the releases remote | |
git push -u releases beta |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line 13 should probably read: # push the beta branch to the releases remote