Skip to content

Commit 1ba3cff

Browse files
author
Martin Meredith
committed
Add script to link to upstream branch
1 parent 3555d62 commit 1ba3cff

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

git-current-branch

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
git rev-parse --abbrev-ref HEAD

git-link-upstream

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
BRANCH=$(git-current-branch)
4+
5+
git branch --set-upstream-to=origin/$BRANCH $BRANCH

0 commit comments

Comments
 (0)