Git on 9front

tags: plan9 · tutorials

This article is also mirrored on the 9front Wiki.


User configuration

; mkdir $home/lib/git
; cat > $home/lib/git/config
	name=Your Name


Create, commit and push a repo:

; cd repo
; git/init
# add a remote in .git/config...
; git/add .
; git/commit -m 'commitmsg' foo.c
heads/front: 817a3f121083091291c45f1ddfcd1b042343efab
; git/push

Clone and push changes to a repo:

; git/clone git://
; cd repo
# make changes...
; git/commit foo.c
; git/push

Make a patch:

# make changes...
; git/commit -m 'commitmsg' foo.c
heads/front: 817a3f121083091291c45f1ddfcd1b042343efab
; git/export > patch.diff

Apply a patch:

; git/import < patch.diff
applying commitmsg

See which files have changed:

; git/diff -s
M foo.c
M bar.c

Shithub usage

First ask Ori (ori AT eigenstate DOT org) for a user.

Create and push a repository:

; rcpu -u $user -h -c \
	newrepo -d 'description' -c '' reponame
; git/push -u hjgit://$user/reponame

Repositories live under /usr/git/$user. Each repo contains editable files in /usr/git/$user/repo/.git:

If this file exists, then the repository is published in the public web list of repositories.
desc, description
The short description of the repository. It shows up in the repo list.
Contact information for submitting patches. Shows up on the repository info page.