Skip to content

Commit

Permalink
Merge pull request #853 from bethesque/feat/git-browse-with-multiple-…
Browse files Browse the repository at this point in the history
…remotes

feat(browse): select remote of current branch, fallback to origin
  • Loading branch information
spacewander authored Jul 27, 2020
2 parents a0a32ab + 572ae0d commit 6e77d95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/git-browse
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

if [[ $1 == "" ]]
then
remote=$(git remote | head -n 1)
branch=$(git rev-parse --abbrev-ref HEAD)
remote=$(git config branch."${branch}".remote || echo "origin")
else
remote=$1
fi
Expand Down

0 comments on commit 6e77d95

Please sign in to comment.