this post was submitted on 09 May 2024
36 points (89.1% liked)

Git

2874 readers
7 users here now

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Resources

Rules

  1. Follow programming.dev rules
  2. Be excellent to each other, no hostility towards users for any reason
  3. No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.

Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

founded 1 year ago
MODERATORS
top 4 comments
sorted by: hot top controversial new old
[–] [email protected] 7 points 6 months ago (1 children)

"start" only works on Windows tho.

Ah, so it's completely useless

[–] [email protected] 16 points 6 months ago

I believe you can replace start with the command that is suitable for your system (e.g., xdg-open for linux).

[–] [email protected] 4 points 6 months ago

This is how I was able to get ssh urls to work into something GitHub can open in the browser. Other sites may need more adjustments

Also, open is the Mac command

	browse = "!open $(git config remote.origin.url | sed \"s/:/\\//;s/git@/https:\\/\\//\")"
[–] [email protected] 3 points 6 months ago

not that it's a better solution, but a different solution is that for github at least, the gh cli is fantastic and has commands for opening the repo both in the cli and the browser, and you can also open issues, prs, etc. I have gh prv aliased to open the current branch's PR in the browser.

❯ gh alias list
c: pr create -a @me -f
ca: pr create -a @me -r myteam -f
co: pr checkout
prurl: pr view --json url -q ".url"
prv: pr view -w