Skip to content

Instantly share code, notes, and snippets.

@debuggerboy
Created November 16, 2014 12:41
Show Gist options
  • Save debuggerboy/19cbd4d1fda623f5f50a to your computer and use it in GitHub Desktop.
Save debuggerboy/19cbd4d1fda623f5f50a to your computer and use it in GitHub Desktop.
fool around with git remote origin
Already have a Git repository on your computer?
$ cd /path/to/existing/repo
$ git remote add origin https://<username>@github.com/<username>/<new_github_repo_created>.git
$ git push -u origin --all # pushes up the repo and its refs for the first time
$ git push -u origin --tags # pushes up any tags
To add a Remote Repo with other name - for ex: "gitbub"
git remote add github https://<username>@github.com/<username>/<new_github_repo_created>.git
To remove a Remote repo with other name : (local repo dir)
git remote rm github
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment