docs:git:adding_a_remote

adding a remote

If you clone a repo, the repo you cloned from will automatically be configured as a remote named “origin”. If you want to set up a remote after the fact, do this

$ git remote add origin /path/to/project.git

Now tell git to update your remote:

$ git push origin master
Everything up-to-date

To make sure the merges work (git push/pull/fetch), do this (replace master with any other branch if you want tracking):

git config branch.master.remote origin
git config branch.master.merge refs/heads/master
  • docs/git/adding_a_remote.txt
  • Last modified: 2009/11/09 16:10
  • by billh