Skip to content
Browse files

Blogged: git-url

  • Loading branch information
doekman committed Mar 8, 2019
1 parent fca04d3 commit 7593e1a631df4769853948b31b610a13a4525665
Showing with 18 additions and 4 deletions.
  1. +1 −2 .ok
  2. +16 −0 _posts/
  3. +1 −2 _sass/_base.scss
3 .ok
@@ -1,2 +1 @@
jekyll serve "$@"
jekyll serve --open "$@"
@@ -0,0 +1,16 @@
layout: post
title: "git-url"
date: 2019-03-08
tags: [cli]

A while ago, [I created a shell script][gist] called `git-url`. It prints the remote origin URL of your current git-repository (or exit 1 if no git-repo is found). If the URL is in `git:` format, it is converted to `http:` format.

Why would one write this? Because of <code>open `git-url`</code>.

This will open the GitHub- or BitBucket-repository in your favorite browser. I use it all the time!

Above works on macOS. Windows uses `start` instead of `open`, but I don't know how it works with Windows Subsystem for Linux.

@@ -132,11 +132,10 @@ code {
font-size: 15px;
border: 1px solid $grey-color-light;
border-radius: 3px;
background-color: #eef;

code {
padding: 1px 5px;
padding: 1px 1px;

pre {

0 comments on commit 7593e1a

Please sign in to comment.
You can’t perform that action at this time.