Git-Flow alternative to support multiple versions of a product

Git-Flow works very well for a scenario where devs mantain & evolve a software with a single instance on production (i.e. http://www.virgingames.com). git

But imagine a scenario where devs develop a software that has different versions installed in different clients and devs have to give some support to old versions. (i.e. Visual Studio) while evolving the latest. Devs have to:

  • Mantain version 1.0 of your software (critical bug fixing) [In our example VS 2013]
  • Mantain version 1.1 of your software (critical bug fixing) [In our example VS 2015]
  • Develop version 1.2 (new features) [In our example VS 2017]

Git-Flow doesn’t support that scenario. Here is my solution, a git flow variant with feature branches and multiple “Master” branches called Release Branches.

Git-flowAlternative

  • Feature Branches and Dev branch works like git-flow.
  • Version 1.0
    • First release (r1.0) is done by creating a branch.
    • Evolutive development continues in Dev branch (and feature branches)
    • It is critical that no evolutive development is done in Release Branch r1.0 so if user wants a new feature he has to wait to r1.1 version.
    • If a critical bug is found in r1.0 version it can be fixed there.
    • If the critical bug is affecting dev, bug fix must be merged to dev branch.
    • If the critical bug is complex a small hot-fix branch can be created (like a feature branch)
  • Version 1.1
    • When next version (r1.1) is ready a new branch is created [Same as previous version]
    • Old branch (r1.0) is kept while we have still users on that version.
    • Once version 1.0 (r1.0) is declared obsolete, users with bugs must install a higher version.
  • Version 1.2
    • Same as version 1.1
  • Etc.

My own basic Git cheat sheet

Git Cheat Sheet

  • Create
    • Clone Repository: git clone url
    • Create new local repository: git init
  • Local Changes
    • Detect pending changes: git status
    • Add files to commit: git add -p <filename> or git add .
    • Commit code: git commit -a -m “Comment”
    • Get code: git pull
    • Push changes: git push
    • View History: git logĀ  / git log -p <filename>
    • History/Blame: git blame <filename>
  • Branches, Merge & Rebase
    • Detect current branch: git branch
    • List all branches: git branch -av
    • Merge branch into current head: git merge <branch>
    • Rebase current head onto <branch>: git rebase <branch>

Git workflow: https://www.atlassian.com/git/tutorials/comparing-workflows

git

Git first steps in Windows

This is the software used in Windows to have a GIT Client

  1. Install latest Git version (http://git-scm.com)
    Ensure to remove Windows Explorer Integration as we should use TortoiseGit.
    git1(1)
  2. Install latest TortoiseGit version (https://code.google.com/p/tortoisegit)
    Alternative to TortoiseGit is GitExtensions (No file icons in Windows Explorer, installs kdiff)
  3. Install Beyond Compare 3.0 and configure TortoiseGit to use Beyond Compare
  4. Optionally install Visual Studio Tools for Git. for Visual Studio 2012-SP3 (Visual Studio 2013 includes Git tools by default)
  5. Optionally install PoshGit to have enhanced git coloured shell
  6. Optionally install Attlasian Source Tree