Skip to content

Commit 7593e1a

Browse files
committed
Blogged: git-url
1 parent fca04d3 commit 7593e1a

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

.ok

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
open http://127.0.0.1:4000/
2-
jekyll serve "$@"
1+
jekyll serve --open "$@"

_posts/2019-03-08-Git-Url.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
layout: post
3+
title: "git-url"
4+
date: 2019-03-08
5+
tags: [cli]
6+
---
7+
8+
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.
9+
10+
Why would one write this? Because of <code>open `git-url`</code>.
11+
12+
This will open the GitHub- or BitBucket-repository in your favorite browser. I use it all the time!
13+
14+
Above works on macOS. Windows uses `start` instead of `open`, but I don't know how it works with Windows Subsystem for Linux.
15+
16+
[gist]: https://gist.github.com/doekman/45acdb0ceedd9dc9dc6105d0b058b06a

_sass/_base.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,10 @@ code {
132132
font-size: 15px;
133133
border: 1px solid $grey-color-light;
134134
border-radius: 3px;
135-
background-color: #eef;
136135
}
137136

138137
code {
139-
padding: 1px 5px;
138+
padding: 1px 1px;
140139
}
141140

142141
pre {

0 commit comments

Comments
 (0)