Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request - Copy main Link (=Copy main Branch Link) #30

Open
guyr-ziprecruiter opened this issue Jul 16, 2024 · 1 comment
Open

Comments

@guyr-ziprecruiter
Copy link

Hello,

It would be great to have another option - Copy main Link (that is - Copy Branch Link with branch set to main, which is usually the standard).

It happens a lot where I need to share a common reference with someone:

  • It's something that's on the shared part of the repo - i.e. committed to main.
  • Permalinks don't matter as I want the link to point to main.
  • Branch link also isn't good because usually I'm not working on main but on my current feature branch.

So having a quick way to get a reference to main would be awesome and very useful. Of course, these are ephemeral - but so are Git Branch Links.

As for determining if the most relevant other branch is main or master - I know this will print only one if it exists:

❯ git --no-pager branch -l main master
  main

Or if it can be made a configurable option, that would also be wonderful.

Thanks in advance!!!

@guyr-ziprecruiter
Copy link
Author

Here's an example patch - if this looks good I can fork and submit a proper PR 🙇

mainlink.patch

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

No branches or pull requests

1 participant