What is the Origin in Git?


origin is the default name for a remote when you run git clone.

If you run git clone -o myRemote instead, then you will have myRemote/master as your default remote branch.

origin designs then often the default alias of a remote repository


As origin define a remote, all actions on origin can also be found in the remote page


When adding a remote repository, the remote URL alias is named origin.

git remote add origin https://github.com/userName/repositoryName.git


git remote remove origin


git remote show origin
* remote origin
  Fetch URL: https://github.com/gerardnico/myRepo.git
  Push  URL: https://github.com/gerardnico/myRepo.git
  HEAD branch: master
  Remote branch:
    master tracked
  Local branch configured for 'git pull':
    master merges with remote master
  Local ref configured for 'git push':
    master pushes to master (local out of date)


git remote set-url origin https://github.com/gerardnico/newRepo.git

Discover More
Git - Clone

git clone creates a clone known as local repository from a remote repository. cloning in git means: downloading the remote repository into a newly created directory setting for each downloaded branch...
Git - Getting Started

An article that takes the basic steps in order to set up a Git repository When you want to set up a repository, you face generally two options: you want to create a fresh install from a Git repository...
Git - Remote (Tracked Repository)

A remote in Git is a remote repository (ie a remote git server). Git remote manage the set of repositories (“remotes”) whose branches you track. They are also called tracked repositories in reference...
Git - Remote and local Branch management

remote and local branch management To synchronize your work, you run: It will fetch everything the remote server has that you don’t have yet. git fetch updates your remote-tracking branches. ...
Commit History Master
Git - Remote-tracking branch

Remote-tracking branches are local references to the state of remote branches You can't modify them. They’re just local references that you can’t move. They represent the state of the remote repository...
Git - Tag

This page is tagging in git Git has the ability to tag specific points in history as being important. Typically this functionality is used to mark release points (v1.0, and so on). Git uses two main...
Git - Upstream Branch (Tracking branch)

An upstream is a configuration of a local branch that set the remote branch that it's tracking. cloning @{u} or @{upstream} means the upstream branch of the current branch @{upstream} or @{u}...
Branches Git
Git - Branch

This page talks Branch management in Git. For Git, a branch is: a commit name (ref) that points to the last commit (head) leaf in the commit log (or log) that represents a commit chain Example...

Share this page:
Follow us:
Task Runner