https://github.com/djuuu/git-build
Simple automated git branch merger
https://github.com/djuuu/git-build
git
Last synced: about 1 year ago
JSON representation
Simple automated git branch merger
- Host: GitHub
- URL: https://github.com/djuuu/git-build
- Owner: Djuuu
- Created: 2015-05-28T13:37:55.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2019-02-04T20:17:37.000Z (over 7 years ago)
- Last Synced: 2025-04-01T17:59:39.805Z (over 1 year ago)
- Topics: git
- Language: Shell
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```bash
ln -s /path/to/git-build/git-build.sh ~/bin/git-build
```
OR
* Create a git alias in your `.gitconfig`
```ini
[alias]
build = "!bash /path/to/git-build/git-build.sh
```
## Usage
### Build Configuration
Create a config file named `.gitbuild-` in your project.
eg: `.gitbuild-preprod`
The file shoud contain the following :
```bash
# 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
```bash
git build
```
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`