Skip to content

Commit

Permalink
Blogged: git-url
Browse files Browse the repository at this point in the history
  • Loading branch information
doekman committed Mar 8, 2019
1 parent fca04d3 commit 7593e1a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .ok
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
open http://127.0.0.1:4000/
jekyll serve "$@"
jekyll serve --open "$@"
16 changes: 16 additions & 0 deletions _posts/2019-03-08-Git-Url.md
Original file line number Diff line number Diff line change
@@ -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.

[gist]: https://gist.github.com/doekman/45acdb0ceedd9dc9dc6105d0b058b06a
3 changes: 1 addition & 2 deletions _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7593e1a

Please sign in to comment.