Skip to content

Commit 4c86859

Browse files
authored
Merge pull request jwiegley#33 from Mezzle/git-link-upstream
Add script to link to upstream branch
2 parents eb97523 + 1ba3cff commit 4c86859

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)