Recently moved from svn to git, pardon my newbie question.
In our release process, we code against the master (and development branches), we have releases once every few weeks, at that point in time, we create a branch and release against that branch.
Bug fixes go on to the branch and we update the release server with those fixes.
Now, when I try to do this in git and try to commit changes to the release branch, it doesn’t let me commit and push changes to branch unless my master is in sync with origin/master. This gets messy if there are many release branches, now I have to make sure each one of them is in sync before I can fix a bug in a release and check it in.
How do you solve this problem?
My team is currently performing releases exactly as you had describe in SVN. Code against trunk, branch and release.
With Git, the workflow changed –
mastermatches production and is never touched, creating and removing branches is painless and ‘cheap-as-chips’ in Git, so every change/hotfix/development is always against a branch. This also enables you to track each development separately.Once development is completed and tested, merge against
master, tag and release. For a hot fix, branchmaster, test, release and merge tomaster.For people developing on other branches, the branches can then easily be brought back up to date using
merge.Have a look at how github develop using git, a very interesting read that should answer your question – https://github.com/usm-data-analysis/usm-data-analysis.github.com/wiki/Developing-with-git