How to do simultaneous builds in two Git branches?

I’ve looked at git-new-workdir, but I don’t want the history to be shared because the branches have a release-main relationship. That is, changes in the release branch I want to propagate to the main line, but changes in the main line I don’t want in the release line.

A common pattern for me is to fix a bug in the release line, integrate it to the main line, then start builds in both branches at the same time.

  • X session in Git Bash on Windows?
  • Copying Visual Studio projects out of TFS and Git without retaining source control information
  • Finding diff between current and last versions?
  • Git asks a password for a wrong URL
  • How do I check git log for a “fast-forward” merge?
  • What is a Git Revision Expression?
  • Is there a way to do this with git-new-workdir, do I need to clone, or is there a better solution?

    Thanks

  • Split git branch into separate repo
  • Can gitweb RSS feed show tags as well?
  • git hunk edit mode - how to remove a '-' line?
  • Is it safe if more git commands are run on the same repo in parallel?
  • Correct way to compare same file in different branches
  • Does EGit “Revert Commit” permanently delete the original commit?
  • 3 Solutions collect form web for “How to do simultaneous builds in two Git branches?”

    git-new-workdir can support this, because each work directory can be setup to use a different branch, i.e. the 2 directories share the same object database, but don’t have to share the same branch.

    For example, assuming your main work directory is in ~/projects/foo, and the main branch is called “master” and the release branch is called “release”

    git-new-workdir ~/projects/foo ~/projects/foo_release release
    git-new-workdir ~/projects/foo ~/projects/foo_master master
    

    then just do your builds from ~/projects/foo_master and ~/projects/foo_release after you’ve fast-forwarded each HEAD to the respective branch head

    git-clone should do what you want.

    Just make sure to never merge from release to main.

    Git Baby is a git and github fan, let's start git clone.