Git remote: Difference between revisions
Jump to navigation
Jump to search
(→update) |
(→prune) |
||
Line 36: | Line 36: | ||
==prune== | ==prune== | ||
Removes the names of stale local branches - tracking branches that still exist in the local repository but whose corresponding remote branches have been deleted. | |||
==remove, rm== | ==remove, rm== |
Revision as of 21:26, 11 December 2017
Internal
Overview
Manages remotes. It can be used to view, create, manipulate and remove a remote. The end result of executing the command is a modification of the corresponding .git/config [remote] entry.
Operations
List the Remotes of the Current Repository
git remote -v origin https://gogs-cicd.apps.openshift.novaordis.io/gogs/novaordis-session-servlet.git (fetch) origin https://gogs-cicd.apps.openshift.novaordis.io/gogs/novaordis-session-servlet.git (push)
Sub-Commands
show
Provide detailed information about the specified remote:
git remote show <remote-name>
add
Add a new remote for the repository at the specified URL, for the current local repository. Once the remote has been established, git fetch can be used to create and update remote-tracking branches.
git remote add github
update
Fetches all updates available in the remote repository:
git remote update <remote-name>
prune
Removes the names of stale local branches - tracking branches that still exist in the local repository but whose corresponding remote branches have been deleted.