This blog moved to medium->https://medium.com/@cocoamaemae

Sunday, May 14, 2017

How to use gitmumerge, merge multiple git branches automatically


Brief

Explain about gitmumerge which is introduced in consideration about how to merge multiple git branches.


gitmumerge


It's just a wrapper of cui git client. It is possible to make executing multiple "git merge" automation. 'mu' means 'mutual'.
https://github.com/cocoa-dev-maemae/gitmumerge

Requirements

Currently, it can work only on bash. Whatever OS is ok. CUI git clinent is essential. Install before using.


(debian)
sudo apt-get install git
(redhat)
sudo yum install git



Install gitmumerge

clone with git and create path

git clone git@github.com:cocoamaemae/gitmumerge.git ~/.gitmumerge
echo 'export PATH="$HOME/.gitmumerge/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc


# confirm version
gitmumerge -v


How to use gitmumerge


At first, clone a git repository which you want to merge, and move to a clone directory.

(e.x.)
git clone <target repository paty>
cd <clone directory>

And then, gitmumerge chance.  Specify the final merge target branch after -d(--destination-branch) and specify the development branches after -c(--candidate-branches)

(exp)

gitmumerge -d master -c dev1 dev2 dev3

Executing the exp, master->dev1, dev1->master, master->dev2, dev2->master, master->dev3, dev3->master order merging is executed. Before merging is executed, [Y/n] is displayed. If the conflict occurs, exit forcibly.


"Merging branches has done" is the exit message. The merging is executed only on client side. So push the branch which is specified after -d(--destination-branch). The operation is manual currently.





No comments:

Post a Comment

Front End Development Tools

TaskRunner Tool executing multiple tasks by only one execution. Tasks are like CSS preprocessor, Transpire, Module Bundler, etc... e.g. ...