Tutorial by Examples

To add a remote, use git remote add in the root of your local repository. For adding a remote Git repository <url> as an easy short name <name> use git remote add <name> <url> The command git fetch <name> can then be used to create and update remote-tracking branch...
Rename the remote named <old> to <new>. All remote-tracking branches and configuration settings for the remote are updated. To rename a remote branch name dev to dev1 : git remote rename dev dev1
Remove the remote named <name>. All remote-tracking branches and configuration settings for the remote are removed. To remove a remote repository dev: git remote rm dev
To list all configured remote repositories, use git remote. It shows the short name (aliases) of each remote handle that you have configured. $ git remote premium premiumPro origin To show more detailed information, the --verbose or -v flag can be used. The output will include the URL and th...
You may want to do this if the remote repository is migrated. The command for changing the remote url is: git remote set-url It takes 2 arguments: an existing remote name (origin, upstream) and the url. Check your current remote url: git remote -v origin https://bitbucket.com/develop/myrep...
You can view more information about a remote repository by git remote show <remote repository alias> git remote show origin result: remote origin Fetch URL: https://localserver/develop/myrepo.git Push URL: https://localserver/develop/myrepo.git HEAD branch: master Remote branches: ...

Page 1 of 1