Hi! If you speak Spanish and you want to learn Git and GitHub, you are in the right place.
In this article, you will find a brief introduction to Git and GitHub. You will learn why they are very powerful tools and why you should learn them if your goal is to be a developer.
Then, you will find a 5+ hour Git and GitHub course on freeCodeCamp's Spanish YouTube channel where you can learn the fundamentals in Spanish with practical examples and projects.
If you have Spanish-speaking friends, you are welcome to share the Spanish version of this article with them.
Let's begin! ✨
🔸 What is Version Control?
First, let's see what version control is because this concept is essential for Git and GitHub.
Haven't you ever wished that you could track the changes you have made to a project or even go back to a previous version of a file?
Let me tell you that this is possible with version control.
With a version control system, you can keep track of the changes you make to your files and keep multiple versions of your project on the same computer simultaneously. This way, you can switch between different versions of your project as you make changes and create new features.
That is the power of version control.
You can keep an "experimental" version of your project to work on a new feature while you also have the stable version of your project live for your users.
Two of the most popular version control tools in the global developer community are Git and GitHub. Let's start with a brief overview of Git.
🔹 What is Git?
Git is one of the most popular version control systems among the developer community. I promise you that learning Git will be totally worth your time if your goal is to be a software developer.
With Git, you can track the changes you make to your files and work with different versions of your project on the same computer.
By learning a few important Git commands, you can focus on your software development projects while Git takes care of the internal details of all the important version control tasks.
◼️ Basic Git Concepts
Now that you know what Git is, let's see some concepts that are essential for working with Git:
A repository is where Git stores our project files and tracks their different versions. A repository can be either local or remote.
A local repository is stored locally on your computer. A remote repository is stored remotely on the servers of the hosting service of your choice (like, for example, GitHub).
The working directory is the directory of the project in our file system where the files are stored. This is, for example, the folder that you open in your code editor or IDE to work with your files.
The staging area contains the set of files and changes that will be included in the next commit (a record of the changes made to the repository). We can add and remove files from this area if we need to.
A commit is like a "snapshot" of your project at a particular moment in time. A commit records changes that have been made to the project. You choose when to create a commit and what to include in that commit.
💡 Tip: To describe the changes recorded in a commit, we write a commit message that we can check later on as we work on the project.
A branch is an independent line of development of a project tracked by Git. Every project starts with a default branch that we usually call
main. We can create a new branch to work on a new feature without affecting the main version of our project.
We can also combine (merge) branches when we need to incorporate the changes that have been made on one branch into another another. This is what we usually do when a new feature is ready to be added to the live version of our project.
These are fundamental concepts for working with Git. Now let's see the actual command-line tool that we will work with.
◼️ Git Bash
During the course, we will use Git Bash, a command-line tool for Windows that provides an environment where we can run Git commands.
💡 Tip: Bash stands for Bourne Again Shell. A bash is an application used to interact with the operating system of a computer through commands.
Great! Now that you know more about Git, let's start diving into the basics of GitHub. Git and GitHub work together to create the workflow that software developers use every day.
🔸 What is GitHub?
When you work with Git, everything you store on your repository is only stored locally. Only you can have access to your repository and to your changes.
This can be exactly what you need if you are working on a personal project.
However, if you are part of a team, you will need to collaborate with other developers to modify the same codebase, which can be very problematic if there is no way to have quick access to the changes made by other developers.
This is where GitHub comes to the rescue!
When you create a GitHub repository, all the members of the team have access to this repository. They can create local copies (clones) of the remote repository on their computers.
These clones are super helpful because developers can work with the files locally, make changes and commits, and send them back to GitHub.
When the remote repository receives new changes, team members can also incorporate these changes into their local repositories to make sure that there are no conflicts between their changes and the changes made by their colleagues.
That is the power of Git and GitHub. Now let's see some data on why you should learn Git and GitHub if your goal is to be a developer.
🔹 Why Should You Learn Git and GitHub?
Git and GitHub are used widely across many different fields and organizations.
💡 Tip: At freeCodeCamp, we use Git and GitHub to maintain and update the live version of the learning platform that you can see and use every day.
Git's official website also mentions that these companies and projects use Git:
- Ruby on Rails
According to the Stack Overflow Developer Survey 2022:
No other technology is as widely used as Git. Especially among Professional Developers.
The results are very consistent. 93.87% of the 71,379 developers who answered this question on the survey use Git as their version control system.
In addition to being a very valuable tool in real-world scenarios, Git is also one of the most popular version control systems in the community of learners who are learning how to code.
Among the respondents who are learning how to code, 81.87% of them use Git.
Based on these results, you can see that Git is a very powerful tool for software developers from all background and levels of experience.
When you combine the power of Git with the power of GitHub, you unlock the true power of version control.
For example, freeCodeCamp's repository is an open-source project hosted on GitHub.
GitHub's official website also mentions that the following organizations host their repositories on GitHub:
- Procter & Gamble
According to the Stack Overflow Developer Survey 2022:
GitHub is the most popular Version Control for both personal and professional use.
In this survey, GitHub was the most popular version control platform among the developer community.
Another great thing about GitHub for learners who are learning how to code is that every profile has a calendar for tracking contributions. This is an interactive calendar with one small square per day.
If you made more contributions on a particular day, you will see a darker shade of green on its corresponding square.
This interactive calendar is frequently used by recruiters to evaluate your experience, projects, and contributions.
When you are actively contributing to projects hosted on GitHub, you create a timeline of contributions that recruiters can review to see how you communicate with other developers and how you face challenges.
Basically, when you contribute on GitHub, you are gradually creating your developer portfolio while you also acquire experience with real-world projects.
Great! Now that you know what Git and GitHub are, and why you should learn, them, let's dive into the course content.
🔸 Course Content
This is a brief outline of the topics that you will learn during the course. By the end of the course, you will be able to work with Git and GitHub on your personal and professional projects.
We will working with text files and simple code files, so you can take this course regardless of the programming language(s) that you have learned so far or even if you are just starting to dive into the amazing world of programming.
💡 Tip: My goal is to teach you the Git and GitHub workflow step by step in a way that will be completely independent from the content of the files. This way, you will be able to apply your knowledge to any coding project.
Introduction to Git
- What is Git? Real-life applications.
- Concept of a repository.
- How to install Git and Git Bash.
- Git Bash Commands.
- Configure Git username and email.
- How to create a Git repository.
- Working directory.
- Staging area.
- What is a commit?
- How to create a commit.
- Show commit history with
- Configure a Git editor (Visual Studio Code).
- Amend the most recent commit.
- Undo a commit.
- What is a branch?
- How to create a branch.
- Checkout a branch.
- Rename a branch.
- Delete a branch.
- Create commits on a branch.
- See commit history on a branch.
- What is merging?
- How to merge two branches.
- Merge conflicts.
- How to delete a branch after merging it with
Introduction to GitHub
- What is GitHub?
- Create your account and profile.
- Customize repository settings.
- Rename a repository.
- Delete a repository.
Git and GitHub Workflow
- Clone a repository.
- Send (push) changes to GitHub.
- Receive (pull) changes from GitHub.
- HTTPS validation for pushing changes.
- Fork a repository.
- Clone a forked repository.
- What is a pull request?
- Start and submit a pull request.
- Update a forked repository.
- What is an issue?
- How to open an issue.
- Issue templates.
- Labels for issues and pull requests.
- Clone new remote branches to a local repository.
- Delete remote and local branches.
We will see how these principles and elements work on a real project: freeCodeCamp's GitHub repository.
We will also create small projects as you learn these topics step by step.
📌 Git and GitHub Course
Awesome. Now that you know more about Git and GitHub and what you will learn during the course, you are welcome to start taking the course in Spanish:
I really hope you like the course and find it helpful to take your first steps into the world of version control.
You are also welcome to continue learning with our other Spanish courses: