GIT: Difference between revisions
From code/src wiki
Jump to navigationJump to search
m Added git signed tag command |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
== Tagging a release == | |||
git commit -a | |||
# Make a signed tag | |||
git tag -s -u michael@codesrc.com $(VERSION) | |||
== Hosting an existing GIT project == | == Hosting an existing GIT project == | ||
So, you've developed some software, made a release, and want to provide public read-only access to all the sources ? | So, you've developed some software, made a release, and want to provide public read-only access to all the sources ? | ||
Line 23: | Line 29: | ||
touch ~/projects/mySoftware/.git/git-daemon-export-ok | touch ~/projects/mySoftware/.git/git-daemon-export-ok | ||
</pre> | </pre> | ||
* Edit the .git/description file on public-host. This description will be shown by gitweb. git does not sync this file from the cloned repository. | |||
* git access is now available via: | * git access is now available via: | ||
** git://public-host/git/mySoftware | ** git://public-host/git/mySoftware | ||
** http://public-host/gitweb/index.cgi?p=mySoftware.git;a=summary | ** http://public-host/gitweb/index.cgi?p=mySoftware.git;a=summary |
Latest revision as of 02:44, 4 October 2011
Tagging a release
git commit -a # Make a signed tag git tag -s -u michael@codesrc.com $(VERSION)
Hosting an existing GIT project
So, you've developed some software, made a release, and want to provide public read-only access to all the sources ?
Assumptions:
- You've already used git to manage software on the host 'dev-host'. The git repository exists in ~/projects/mySoftware, with a corresponding ~/projects/mySoftware/.git directory.
- You have access to 'public-host', which is running apache.
- On public-host, install the necessary packages
sudo apt-get install git-daemon-run gitweb
- On public-host, clone the existing git repository
cd ~/projects git clone ssh://dev-host/~/projects/mySoftware
- On public-host, make the repository available. gitweb and the git daemon will look in /var/cache/git
cd /var/cache/git sudo ln -s ~/projects/mySoftware/.git mySoftware.git touch ~/projects/mySoftware/.git/git-daemon-export-ok
- Edit the .git/description file on public-host. This description will be shown by gitweb. git does not sync this file from the cloned repository.
- git access is now available via: