Skip to content

Commit 5444c1b

Browse files
committed
Import script, original idea by alexxy
Signed-off-by: Justin Lecher <jlec@gentoo.org>
1 parent 6a671b2 commit 5444c1b

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

‎scripts/merge-dualHEAD‎

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#!/bin/bash
2+
3+
if [[ -f /usr/lib64/portage/bin/isolated-functions.sh ]]; then
4+
. /usr/lib64/portage/bin/isolated-functions.sh
5+
elif [[ -f /usr/lib/portage/bin/isolated-functions.sh ]]; then
6+
. /usr/lib/portage/bin/isolated-functions.sh
7+
else
8+
alias ebegin=echo
9+
alias eend=true
10+
fi
11+
12+
ebegin "Starting from master"
13+
echo
14+
git checkout master || exit; _ret=$?
15+
echo
16+
eend ${_ret}
17+
18+
ebegin "Fetching everything"
19+
echo
20+
git fetch --all -v || exit; _ret=$?
21+
echo
22+
eend ${_ret}
23+
24+
ebegin "Merging github"
25+
echo
26+
git merge -v github/master || exit; _ret=$?
27+
echo
28+
eend ${_ret}
29+
30+
ebegin "Pushing to g.o.g.o"
31+
git push -v origin || exit; _ret=$?
32+
echo
33+
eend ${_ret}
34+
35+
ebegin "Branching out github"
36+
echo
37+
git checkout -b github-merging github/master || exit; _ret=$?
38+
echo
39+
eend ${_ret}
40+
41+
ebegin "Merging in g.o.g.o"
42+
echo
43+
git merge -v origin/master || exit; _ret=$?
44+
echo
45+
eend ${_ret}
46+
47+
ebegin "Pushing to github"
48+
echo
49+
git push -v github HEAD:master || exit; _ret=$?
50+
echo
51+
eend ${_ret}
52+
53+
ebegin "Going back to master"
54+
echo
55+
git checkout master || exit; _ret=$?
56+
echo
57+
eend ${_ret}
58+
59+
ebegin "Removing github branch"
60+
echo
61+
git branch -v -D github-merging || exit; _ret=$?
62+
echo
63+
eend ${_ret}

0 commit comments

Comments
 (0)