Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Remote Branches | Basic Interaction with Remotes
GitHub Fundamentals
course content

Contenido del Curso

GitHub Fundamentals

GitHub Fundamentals

1. Introduction to GitHub
2. Basic Interaction with Remotes
3. More Advanced Workflows

Remote Branches

As you have just seen, when working with remotes, there are two types of branches: local and remote.

Let's take a look at the remote branches (-r stands for remote) that our Git repo is currently tracking by running the following command:

Since these branches are read-only, you must fetch the changes to your local machine, merge them with your local changes, and then push them back to the remote repository to make changes.

That's all good, but how can we find out whether our current branch is up to date with its remote counterpart? The familiar git status command can help with this; it not only shows the status of your local working directory but also indicates if your branch is ahead, behind, or in sync with the remote branch it tracks.

Let's now run it:

In our case, git status tells us that our local main branch is up to date with origin/main, meaning there are no new changes on the remote main branch that you haven't already included in your local version.

¿Todo estuvo claro?

Sección 2. Capítulo 2
We're sorry to hear that something went wrong. What happened?
some-alt