simple remote git repo howto

This tiny little howto has really helped me along many times.  I’ve used SVN for a long time, so the idea of having a remote repo makes sense to me.

I’ll put it up here as a small reference, but I imagine I’ll probably be the one using it the most. :)

local: git init

remote: mkdir project.git
cd project.git
git init –bare

local: git remote add origin ssh://server/~steve/project.git

git push origin master
server: git clone ~/project.git ~/projects/name
local: git push

server: git pull

About these ads

2 Comments

Filed under Gentoo

2 responses to “simple remote git repo howto

  1. I use this script for uploading new git repos to my git web/remote server. I run it in my current local git directory and as an argument I give it a description:

    http://pastebin.com/puRsCudh

  2. If you want the remote repo’s working copy updated on a local push, setup a post-update hook like described here.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s