What Is GIT Remote?
Table Of Contents:
- What Is GIT Remote?
- How To Check Your Remote Repository Details ?
(1) What Is GIT Remote ?
- ‘Remote’ is the keyword used for to check the remote repository configuration.
- A remote repository is stored on code hosting services like an internal server, GitHub, Subversion, Bitbucket and more.
(2) How To Check Your Remote Repository Details ?
Syntax:
git remote
Output:
origin
- The default name for the remote repository is the ‘origin’.
Syntax:
git remote -v
Output:
origin https://github.com/Subrat/Project.git(fetch)
origin https://github.com/Subrat/Project.git(push)
- The above output is providing available remote connections.
- If a repository contains more than one remote connection, this command will list them all.
(3) How To Give A Short Name To Your Remote Repository?
Syntax:
git remote add <short name> <remote URL>
Example-1:
git remote add HALO https://github.com/Subrat/Project.git
git remote -v
Output:
HALO https://github.com/Subrat/Project.git(fetch)
HALO https://github.com/Subrat/Project.git(push)
- Here you can see that the remote repository name has been changed.