Transformatorhuis

February 24, 2008

Adding GIT repository on cyberroadie.org

Filed under: git — cyberroadie @ 10:05 am

Steps to take to add a project named ‘test’:

Usefull to start with:

git config --global user.name "Olivier Van Acker"git config --global user.email cyberroadie_@_gmail.com

Or add this info under [user] in .gitconfig file in your home directory like this:[user]       name = Olivier Van Acker       email = cyberroadie_@_gmail.com

Creating and adding the project:
  1. Locally: mkdir test
  2. cd test
  3. Add/create source files
  4. git init
  5. git add .
  6. git commit -m “Initial import of test project”
  7. ssh cyberroadie@www.cyberroadie.org
  8. cd /var/git/
  9. mkdir test.git
  10. GIT_DIR=test.git git-init-db
  11. touch test.git/git-daemon-export-ok
  12. vi test.git/descripton
  13. chmod +x test.git/hooks/post-update
    (http://www.kernel.org/pub/software/scm/git/docs/hooks.html)
  14. Locally to push all your branches:
    git push --force --all ssh://www.cyberroadie.org/var/git/test.git

Based on the GIT cheat sheet: http://www.gnome.org/~federico/misc/git-cheat-sheet.txt

Blog at WordPress.com.