Joined March 2013
·
Posted to
Git post-receive hook to checkout a specific branch
over 1 year
ago
@myserioushunt sorry I just saw this comment. Not sure how long you've been waiting for an answer. I would approach it from a standpoint of having two separate git remotes on the same server. So you could have myrepo-production.git
and myrepo-develop.git
. Alter the paths in the post receive hook for each remote accordingly. Then you would be able to git push production mybranch
and git push develop mybranch
.
Achievements
219 Karma
15,581 Total ProTip Views
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
Lemmings 100
Write something great enough to have at least 100 watchers of the project
Forked 20
Have an established project that's been forked at least 20 times
Forked
Have a project valued enough to be forked by someone else
Charity
Fork and commit to someone's open source project in need
Python 3
Have at least three original repos where Python is the dominant language
Python
Would you expect anything less? Have at least one original repo where Python is the dominant language
Thanks for this! Saved me a big headache when I switched my Express response calls from the deprecated res.json(status, body) calls to the new res.status(status).json(body) format. Cheers!