Contenido del Curso
GitHub Fundamentals
GitHub Fundamentals
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.
¡Gracias por tus comentarios!