diff options
author | Alan Pearce | 2018-06-07 13:55:17 +0200 |
---|---|---|
committer | Alan Pearce | 2018-06-07 13:55:17 +0200 |
commit | 10dded485e1c2627575b2b9e21dfaabc31ee07f3 (patch) | |
tree | b3f0369bae776cd556078225fc446c10165f8624 /content/post/self-hosted-git.md | |
parent | 956bf3a40be61da586bd5178a3868ca037eebbe8 (diff) | |
download | website-10dded485e1c2627575b2b9e21dfaabc31ee07f3.tar.lz website-10dded485e1c2627575b2b9e21dfaabc31ee07f3.tar.zst website-10dded485e1c2627575b2b9e21dfaabc31ee07f3.zip |
Use code fences instead of template tags for syntax highlighting
Diffstat (limited to 'content/post/self-hosted-git.md')
-rw-r--r-- | content/post/self-hosted-git.md | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/content/post/self-hosted-git.md b/content/post/self-hosted-git.md index c73d255..883ea0f 100644 --- a/content/post/self-hosted-git.md +++ b/content/post/self-hosted-git.md @@ -62,22 +62,22 @@ means that I can create a remote repository automatically by cloning a repository URL that doesn't already exist. I can clone and create a new repo simultaneously like so: -{{< highlight shell-session >}} +```shell cd ~/projects git clone alanpearce.eu:some-new-repository -{{< /highlight >}} +``` But with [ghq][], which I [blogged about before][using-ghq], I don't have to concern myself with where to put the repository: -{{< highlight shell-session >}} +```shell $ ghq get alanpearce.eu:some-new-repository clone ssh://alanpearce.eu/some-new-repository -> /Volumes/Code/projects/alanpearce.eu/some-new-repository git clone ssh://alanpearce.eu/some-new-repository /Volumes/Code/projects/alanpearce.eu/some-new-repository Cloning into '/Volumes/Code/projects/alanpearce.eu/some-new-repository'... Initialized empty Git repository in /var/lib/gitolite/repositories/some-new-repository.git/ warning: You appear to have cloned an empty repository. -{{< /highlight >}} +``` The nice URLs come from this piece of my SSH configuration: @@ -92,10 +92,10 @@ Host alanpearce.eu This repository would be private by default, but I can change that by an SSH command. Here's how I would do it: -{{< highlight shell-session >}} -$ ssh alanpearce.eu perms some-new-repository + READERS gitweb -$ ssh alanpearce.eu perms some-new-repository + READERS daemon -{{< /highlight >}} +```shell +ssh alanpearce.eu perms some-new-repository + READERS gitweb +ssh alanpearce.eu perms some-new-repository + READERS daemon +``` The first command makes it visible in cgit, whilst the second makes it clonable via `git://` url. I can make a repository @@ -105,15 +105,14 @@ user and not `gitweb`, if I wanted. I can also add or change the description of a repository shown on cgit like so: -{{< highlight shell-session >}} -$ ssh alanpearce.eu desc some-new-repository 'A new repository' -{{< /highlight >}} +```shell +ssh alanpearce.eu desc some-new-repository 'A new repository' +``` All the remote commands exposed by gitolite are described in the -`help` command +`help` command e.g. `ssh alanpearce.eu help` -{{< highlight shell-session >}} -$ ssh alanpearce.eu help +``` hello alan, this is gitolite@oak running gitolite3 (unknown) on git 2.12.2 list of remote commands available: @@ -126,7 +125,7 @@ list of remote commands available: perms writable -{{< /highlight >}} +``` ## Conclusion |