Actions

EmSys

Git - Remote Branches

From EdWiki

GitLab - Remote Branches

  • Goals
    Learn about local VS remote branches

Let’s look at the branches available in our cloned repository.

git branch

Only the master branch should be listed. Where is the greet branch?
The git branch command only lists the local branches by default.

  • List Remote Branches
git branch -a

Git has all the commits from the original repository, but branches in the remote repository are not treated as local branches here. If we want our own greet branch, we need to create it ourselves. We will see how to do that in a minute.