Skip to content

Instantly share code, notes, and snippets.

@johnhunter
Created April 21, 2012 13:45
Show Gist options
  • Select an option

  • Save johnhunter/2437138 to your computer and use it in GitHub Desktop.

Select an option

Save johnhunter/2437138 to your computer and use it in GitHub Desktop.
Add a local repo to a remote
Create a git repo and push to remote:
mkdir new_git_repo
cd new_git_repo
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin [email protected]/new_git_repo.git
git push -u origin master
Existing Git Repo?
cd existing_git_repo
git remote add origin [email protected]/existing_git_repo.git
git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment