# ------- SERVER -------
# On the SSH server we assume var/git as the central repository
# place and will create a new project-X dir
$ cd /var/git
$ mkdir project-X
$ cd project-X
# now we initialize this directory
# but instead of using git init, we use git --bare init
# "A short aside about what git means by bare:
# A default git repository assumes that you
# will be using it as your working directory
# So git stores the actual bare repository files in a .git
# directory alongside all the project files.
# Remote repositories don't need copies of the files on the
# filesystem unlike working copies,
# all they need are the deltas and binary what-nots of the repository itself.
# This is what "bare" means to git. Just the repository itself."
$ git --bare init
# ---- on the project working copy -------
#Pushing your local repository to the shared repository
# First go to your local repository
$ cd $HOME/project-X
$ git init
$ git add *
$ git commit -m "My initial commit message"
# Then make the link to the shared repository
$ git remote add origin ssh://fabio@server/media/software/gitRe ... sicPlayer/
# for http access use: git remote add origin git@example.com:my_project.git
$ git push -u origin master
Accessing the repository
# Another user can now clone the repository using:
$ git clone ssh://user@gitserver/var/git/project-X
# Change something
$ ....
# Commit the changes
$ git commit -a
# Push the changes to the central repository
$ git push
from http://www.jedi.be/blog/2009/05/06/8-ways-to-share-your-git-repository/#sshserver
Start a new project using Git
Who is online
Users browsing this forum: No registered users and 2 guests