cat brain.log | less

Getting it down on `paper`

Setting Up a Remote git Repository

There’s no substituting for git help remote. The following is a common situation. It assumes that reponame.git does not exist on the remote machine and that you’re in a hurry to get things done.

 // The remote repo
 mkdir reponame.git
 cd reponame.git
 git init --bare
 cd ..
 scp -r reponame.git server.com:/path/to/reponame.git
 rm -r reponame.git
 // Optional: add existing code
 cd code
 git init
 git add *.c *.h Makefile
 git commit -m "initial import"
 // if you somehow already have a remote, first issue `git remote rm origin`
 git remote add origin ssh://server.com/path/to/reponame.git
 git push origin master
 // Clone remote repo to local system
 git clone ssh://server.com/path/to/reponame.git
 // ... now get to work!
 

Comments

No comments so far.

(comments are closed)