top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Git: Hotfix in a develop/master branch model for old version

+1 vote
365 views

For a project I use git with a dev branch. If it get's stable, it is merged to master. Now I have to maintain different versions of the software. (for example v1.0 and v2.0)

What is the best way to handle a hotfix for the old version v1.0? I know, I can create a hotfix branch. But what to do after that? Should I maintain this hotfix branch forever or is it better to merge the hotfix somehow into the master branch?

Currently I have to integrate a hotfix for v1.0. It's about a feature, which was removed in v2.0. So I think it's not a good idea to merge it back to master. But is it really a good idea to maintain a long running branch for every version?

posted Feb 16, 2015 by Majula Joshi

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Try the following link http://nvie.com/posts/a-successful-git-branching-model/

If "Hotfix" is not a nice word in your local environment, try "Maintenance-V1.0", or similar (i.e. a socially acceptable name) as the name for the long running branch - you can still use hot-fix for the temporary branch that will be merged so the name carries local temporary meaning.

answer Feb 16, 2015 by Kiran
Similar Questions
0 votes

When I update my branch from master it pulls down several files, including some sass files. When I compile, however, gulp alerts me that I am missing .scss files.

I tested this by creating a new fresh branch and running gulp sass. This time there were no errors and I saw the missing .scss had been brought in.

Would anyone know why, on update, I am only getting some of the files from master?

+1 vote

Suppose i have a directory with many files .. I commit a good version .. then I make a bunch of changes and I messed something up .. how do I revert back to the old version? will all the files be replaced from the current messed up files to the older good files? I am using SourceTree.

0 votes

I need to provide a list of all branches I have merged into develop since a given date.
Can you recommend a git command that will do this?

+5 votes

basically, I've got clones of some expensive-to-build projects (node.js), and I have changes that I want to rebase/cherry-pick onto dev and stable branches.

I know I can push to a remote, then pull into my other, and keep the two on different branches so the builds don't get out of date. But, I think I'd like it if they all just shared the same objects, branches, etc...

Could I symlink together my .git{branches,config,hoks,logs,objects,packed-refs,refs} directories? Is this just going to kill me later?

+1 vote

Lets say I've got a topic branch. I've made a bunch of commits. It's messy. But it's done.

As I understand it, best practice is to do a squash commit of the whole thing onto the parent branch (develop or master, depending on workflow). And I can do that.

What do I do with the leftover? I thought I could tag it as "closed", but I can't use the same tag more than once. What's the best way to mark it as done, or should I just delete the branch label and let it be garbage collected/deleted?

...