Utility tool for building Git branches my merging multiple other branches together.
Project description
Utility tool for building Git branches by merging multiple other branches together.
Free software: BSD license
For guidelines on contributing to the project please read the CONTRIBUTING documentation.
Documentation
In some cases it may be desirable to have full control over what code is deployed. This can be accomplished by creating a YAML configuration file to describe what should be included in your branch.
The format of the file is as follows:
trunk: master
name: autostaging # name of the branch to build
branches: # list of branches to merge into final branch
- feature1
- feature2
- forkowner:feature3 # branch from fork of repository
submodules:
submodules/module1:
branches:
- feature1
- forkowner:feature2 # branch from fork of repository
submodules/module2:
trunk: develop
branches:
- feature2
To add some safety around this file you should use the safe-commit-files utility:
safe-commit-files --push /path/to/branch_config.yml
Building the branch
This configuration file can be used to build a deploy branch:
git checkout master
git-build-branch path/to/branch_config.yml
Conflict Resolution
First, determine where the conflict lies.
a). branch foo conflicts with master
git checkout -b foo origin/foo
git pull origin master
# try to resolve conflict
git push origin foo
b). branch foo conflicts with branch bar
You can’t just merge foo into bar or vice versa, otherwise the PR for foo will contain commits from bar. Instead make a third, conflict-resolution branch:
git checkout -b foo+bar --no-track origin/foo
git pull origin bar
# try to resolve conflict
git push origin foo+bar
Now add the branch foo+bar to branch_config.yml and move branches foo and bar to right below it.
Later on branch B gets merged into master and removed from branch_config.yml.
Perhaps the person who removes it also notices the A+B and does the following. Otherwise anyone who comes along and sees A+B but not both branches can feel free to assume the following need to be done.
Merge A+B into A. Since B is now gone, you want to merge the resolution into A, otherwise A will conflict with master.
Remove A+B from branch_config.yml. It’s no longer necessary since it’s now a subset of A.
If you are unsure of how to resolve a conflict, notify the branch owner.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file git-build-branch-0.1.16.tar.gz
.
File metadata
- Download URL: git-build-branch-0.1.16.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cecc7d780a93e51c7b31701256c0647082bf099a02311432e584cb768e8e3a2 |
|
MD5 | 407c3d034500296bdef06af7ea4ddfa5 |
|
BLAKE2b-256 | 4859cde11513eecbcb7bd1a516bb23160bcdc626b347932db3ba0b9e4b19d856 |
File details
Details for the file git_build_branch-0.1.16-py2.py3-none-any.whl
.
File metadata
- Download URL: git_build_branch-0.1.16-py2.py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a7767490d003700d082217a1db7f7a15848b8a2f84829e51768f91d150d167f |
|
MD5 | aff19679280dc55c795cf6b6b01a8144 |
|
BLAKE2b-256 | 5681991689059a676f1c48cc6918cda44c846325a81c21acf36f7eb4026c5aac |