We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5970ccd commit 3d2d142Copy full SHA for 3d2d142
git-downmerge
@@ -0,0 +1,21 @@
1
+#!/bin/bash
2
+
3
+set -e
4
5
+# import dependency
6
+parentPath=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
7
+. "$parentPath/os-open"
8
9
+# Check if params are enough to go ahead.
10
+downmergeFrom=$1
11
+downmergeTo=$2
12
+test -z "$downmergeFrom" && echo "Please provide downmerge-from branch and downmerge-to branch." 1>&2 && exit 1
13
+test -z "$downmergeTo" && echo "Please provide both downmerge-from as first argument branch and downmerge-to branch as the second argument." 1>&2 && exit 1
14
15
+git fetch -p
16
+git checkout -B sync/$downmergeTo
17
+git reset --hard origin/$downmergeTo
18
+git merge origin/$downmergeFrom
19
+echo "resolve conflicts if any"
20
+echo "then do git commit"
21
+echo "and then git push origin sync/$downmergeTo"
0 commit comments