Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 44 lines (32 sloc) 1.774 kb
bbeac48b »
2008-07-24 Add a README that explains this project a bit better.
1 git-tools
2 =========
3
4 git-tools is a collection of scripts and tools to make developing with git and hosting a git repo easier.
5
6 Creating a Repository
7 ---------------------
8
9 The `mkgit` command is provided to create a git repository on the machine you intend to use to host the repo. It assumes you have a user named `git` and will try to `sudo` as `git` if it isn't run as `git`.
10
11 It takes a single argument: the name of the project.
12
13 git@code-$ mkgit project-one
14 Creating repo project-one.git
15 Initialized empty Git repository in /tmp/project-one.git/
16
17 Next steps:
18 mkdir project-one
19 cd project-one
20 git init
21 touch README
22 git add README
23 git commit -m 'first commit'
24 git remote add origin git@code:project-one.git
25 git push origin master
26
27 Existing Git Repo?
28 cd existing_git_repo
29 git remote add origin git@code:project-one.git
30 git push origin master
31
32 When you're done, it prints instructions on how to set up the repo on your client (dev) machine. Kudos to github for thinking of this.
33
34 github-style post-receive hook
35 ------------------------------
36
37 The `post-receive` script will send a JSON payload to all the uris listed in the repo's `hooks.uris` configuration option. Most likely you'll want to set it on a system level. Example:
38
39 git@code-$ git config -l
40 uris.project=http://code.example.com/projects/show/%name%
41 uris.commit=http://code.example.com/repositories/revision/%name%?rev=%id%
42 hooks.uris=http://localhost:8001/
43
44 The above will post to `http://localhost:8001/` with the JSON payload. The other two configuration options are for uris that go into the payload, such as the uri for the commit and the uri for the project. The above examples are for Redmine.
Something went wrong with that request. Please try again.