shithub: wiki.9front.org

ref: 45f6dd9f8e21e2e8d6b185d39b2f36098e62b286
dir: /git9.md/

View raw version
Resources
=========

* [9front git man page](http://man.9front.org/1/git)
* [Ori's article on Git9](https://orib.dev/git9.html)

User configuration
==================

	% mkdir $home/lib/git
	% cat > $home/lib/git/config
	[user]
		name=Your Name
		[email protected]
	^D

Examples
========

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://git.example.org/repo
	% 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 shithub.us -c \
		newrepo -d 'description' -c '[email protected]' reponame
	% git/push -u hjgit://shithub.us/$user/reponame

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

* `webpublish`: 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`: Contact information for submitting patches. Shows up on the repository info page.