The git remote
command aids in managing remote repositories. When a programmer is working on multiple repositories, the git remote
command enables the programmer to view the current remote, add a remote connection, remove a remote connection, etc.
See the full syntax of the command below:
git remote <options>
-v
The git remote -v
command allows the user to view the names (e.g., origin) and the URLs of the remote connections.
add <name> <URL>
The git remote add <name> <URL>
command creates a remote connection to the URL
with the name, name
. The default name
is origin.
remove <name>
The git remote remove <name>
command removes the remote connection of the given name
.
rename <prev-name> <new-name>
The git remote rename <prev-name> <new-name>
command changes the name of the remote connection fromprev-name
to new-name
.
Free Resources