Quick cheatsheet for adding a new git repository under my setup (with gitosis)
The main reason that I have this note is because this is much simpler than I expect - I always think that it will be much more complex, and so start researching how everything fits together :-)
1: Add the project / repo to gitosis:
1.1: Edit the ~/src/configs/gitosis-admin/gitosis.conf:
[group data]
members = wkumari wkumari@eric
writable = data
1.2: Commit and push the change:
root@ron[0]:~/src/configs/gitosis-admin# git commit -a -m "Added the 'data' repository"
[master 9072fe9] Added the 'data' repository
1 file changed, 4 insertions(+)
root@ron[0]:~/src/configs/gitosis-admin# git push
Counting objects: 3, done.
Delta compression using up to 24 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 331 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
ToThis email address is being protected from spambots. You need JavaScript enabled to view it. :gitosis-admin.git
7320023..9072fe9 master -> master
2: Create and push the repo:
wkumari@ron[0]:~$ mkdir data
wkumari@ron[0]:~$ cd data/
wkumari@ron[0]:~/data$ ls
wkumari@ron[0]:~/data$ touch testfile
wkumari@ron[0]:~/data$ git init
Initialized empty Git repository in /home/wkumari/data/.git/
wkumari@ron[0]:~/data$ git add testfile
wkumari@ron[0]:~/data$ git commit -a -m "Add a test file"
wkumari@ron[0]:~/data$ git remote add originThis email address is being protected from spambots. You need JavaScript enabled to view it. :data.git
wkumari@ron[0]:~/data$ git push --set-upstream origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 214 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
ToThis email address is being protected from spambots. You need JavaScript enabled to view it. :data.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
wkumari@ron[0]:~/data$ git push
Everything up-to-date
3: Profit!!!