Details for how to do this are here:
http://git-scm.com/book/en/Git-on-the-Server-Setting-Up-the-Server
But since I'm the only user, I didn't need to set up a special git user, as described there. The point of doing that is to allow multiple people to access the repo (though you could also manage that just with file permissions, if they all have shell access anyway). The only thing I actually had to do, then, was to set up the repositories on the server and commit stuff to them.
Since I occasionally need to create new repos, here are the steps.
On the server:
# cd /gitIt actually doesn't matter where you put the repos. But putting them in some central location makes a lot of sense, right?
# mkdir /newrepo
# cd newrepo
# git --bare init
Then, on the client where I've got the stuff I want to put in that repo:
# cd /path/to/local/On various other clients, I can then clone the new repo as usual:
# git init
# git add <files>
# git commit -a -m "Initial commit."
# git remote add origin myserver.com:/git/newrepo
# git push --set-upstream origin master
# git clone ssh://myserver.com/git/newrepoOf course, this doesn't allow anyone else access, even read-only access. But since it's just for me....
No comments:
Post a Comment
Comments welcome, but they are expected to be civil.
Please don't bother spamming me. I'm only going to delete it.