How to create a release branch in GIT?
I want to create a 'live-release' branch in GIT, so I can tell capistrano to pull the source from that branch.
S开发者_如何学编程ay 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.
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.
精彩评论