1
0
Fork 0
mirror of https://github.com/Djuuu/git-build.git synced 2025-12-09 18:35:30 +01:00
Simple automated git branch merger
git
Find a file
2019-02-04 21:17:24 +01:00
.gitignore Initial commit 2019-02-04 21:15:40 +01:00
git-build.sh permissions fix 2019-02-04 21:17:24 +01:00
README.md Update README.md 2019-02-04 21:16:55 +01:00

git-build

This script merges a list of branch into a defined destination branch, starting from master.

It can be used to build a new release candidate composed of several branches, with a clean git tree.

Installation

  • Clone The repository

Then :

  • Create a symlink to the script in a directory in your path
ln -s /path/to/git-build/git-build.sh ~/bin/git-build

OR

  • Create a git alias in your .gitconfig
[alias]
    build = "!bash /path/to/git-build/git-build.sh

Usage

Build Configuration

Create a config file named .gitbuild-<BUILDNAME> in your project.

eg: .gitbuild-preprod

The file shoud contain the following :

# Name of the branch to build
build_branch=PREPROD

# Branches to merge into $build_branch
build_branches[0]=some-branch-name
build_branches[1]=other-branch-name
build_branches[2]=branch-name-3
# ...

Launching a build

git build <BUILDNAME>

e.g. git build preprod

Conflicts should be resolved the same way than when rebasing :

  • resolve conflicts
  • stage the fixed files
  • run git build --continue