File: git-graft

package info (click to toggle)
git-extras 7.4.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 2,120 kB
  • sloc: sh: 4,312; python: 994; makefile: 146
file content (11 lines) | stat: -rwxr-xr-x 250 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env bash

src=$1
dst=$2

test -z "$src" && echo "source branch required." 1>&2 && exit 1
test -z "$dst" && echo "destination branch required." 1>&2 && exit 1

git checkout "$dst" \
  && git merge --no-ff "$src" \
  && git branch -d "$src"