Friday 11 November 2011

Git remote related commands

Changing a remote's URL
git remote set-url example git://github.com/user/test.git will set the URL of the remote named “example” to git://github.com/user/test.git.


Tracking remote branch
Tracking when creating a new branch:
The full syntax is:
$ git checkout -track -b [local branch] [remote]/[tracked branch]
Simpler version is:
$ git checkout -t origin/branch
Setting up tracking for an existing branch:
$ git branch --set-upstream branch upstream/branch
Setting upstream when push
$ git push -u [remote] [branch]

No comments :

Post a Comment