Skip to content

Conversation

@bethesque
Copy link
Contributor

No description provided.

bin/git-browse Outdated
if [[ $1 == "" ]]
then
remote=$(git remote | head -n 1)
remote=$(git remote | grep origin | head -n 1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to use git config branch.$branch.remote || echo "origin", while the $branch is the current branch? So that we can get the remote of the current branch, or fallback to origin.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I'll update the code.

@spacewander
Copy link
Collaborator

@bethesque
Will you continue to work on this PR?

@bethesque
Copy link
Contributor Author

Yes! I just haven't had my usual "train trip" OSS time recently due to some pesky pandemic. I'll see if I can get to it.

@bethesque bethesque force-pushed the feat/git-browse-with-multiple-remotes branch from d81eccc to 572ae0d Compare July 25, 2020 22:23
@bethesque bethesque changed the title feat(browse): automatically select origin remote if one exists, fallback to first otherwise feat(browse): select remote of current branch, fallback to origin Jul 25, 2020
@spacewander spacewander merged commit 6e77d95 into tj:master Jul 27, 2020
@spacewander
Copy link
Collaborator

@bethesque
Merged. Thanks!

@bethesque
Copy link
Contributor Author

Thanks for maintaining this handy tool.

@bethesque bethesque deleted the feat/git-browse-with-multiple-remotes branch July 27, 2020 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants