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.

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.

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.


Need Your Help

Copy nservicebus message headers on reply

nservicebus

Is it posible to say NSB to copy all message headers from command message to reply?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.