Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a release branch in GIT?

Tags:

git

I want to create a 'live-release' branch in GIT, so I can tell capistrano to pull the source from that branch.

Say I am in master, and now I am ready for a release, how can I push the code (FORCE) to the 'live-release' branch?

I want to force because I don't really care about merge conflicts, I just want to, whenever i am ready, to push to 'live-release'.

I want to avoid using master because it can be unstable.

like image 658
Blankman Avatar asked Nov 15 '25 12:11

Blankman


1 Answers

Assuming both branches are in the same repository, use:

git push --force . master:live-release

Or replace the . with the name (URL) of the live-release repository.

I'd recommend you don't use force. If you only ever push to live-release from master then there should never be a merge conflict. If you do see a conflict then something has gone horribly wrong that you probably want to fix before you clobber your live-release branch.

like image 140
Cameron Skinner Avatar answered Nov 17 '25 08:11

Cameron Skinner



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!