Skip to content

Instantly share code, notes, and snippets.

@stevebartholomew
Created April 14, 2010 07:42
Show Gist options
  • Save stevebartholomew/365556 to your computer and use it in GitHub Desktop.
Save stevebartholomew/365556 to your computer and use it in GitHub Desktop.
cd my-project
git clone --bare . ../my-project.git
scp -r ../my-project.git user@server:/path/to/git-repositories/
git remote add origin user@server:/path/to/git-repositories/my-project.git
# then you can do:
git push
git pull
etc etc
# For remote branch management
gem install grb
@gerhard
Copy link

gerhard commented Apr 14, 2010

There's an easier way. This on the server:

mkdir my-project.git && cd !$
git --bare init

Now locally:

git remote add origin user@server:/path/to/git-repositories/my-project.git

No need for grb. To delete a remote branch git push origin :branch-to-delete. You don't really need anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment