git remote
is a Git command that is used to manage remote repository references. The main purpose of git remote
is to manage connections with remote Git repositories. With git remote
, you can:
- Show a list of all remote repository references that are stored in your Git repository
- Add a new remote repository reference
- Rename a remote repository reference
- Remove a remote repository reference
- Fetch data from a remote repository
- Publish local changes to a remote repository
Examples:
- Show remote repositories: $ git remote
- Add remote repository: $ git remote add <shortname> <url>
- Rename remote repository: $ git remote rename <oldname> <newname>
- Remove remote repository: $ git remote rm <name>
- Fetch data from remote repository: $ git fetch <remote>
- Publish local changes to remote repository: $ git push <remote> <branch>