Skip to content

Instantly share code, notes, and snippets.

@putnamhill
Last active December 14, 2017 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save putnamhill/8726de816d8100beb34b1e45df73538a to your computer and use it in GitHub Desktop.
Save putnamhill/8726de816d8100beb34b1e45df73538a to your computer and use it in GitHub Desktop.
Steps to create a bare git repo
## setting up a personal git repository that you can push change sets to
## ssh-host: a host defined in ~/.ssh/config (see: ssh_config(5))
## camaro: the name of the repo
# on a remote host or local filesystem:
git init --bare camaro.git # (option: use --shared if there are other contributors)
# on local host cd to camaro directory:
git remote add origin ssh-host:[path/]camaro.git
# (for origin on local filesystem: git remote add origin file:///media/volume-name/camaro.git)
git push --set-upstream origin --all
git push --set-upstream origin --tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment