Git and GitHub: A guide to pushing your projects without errors!
Learn all about Git and GitHub in this complete guide from Impulso and start creating on the platform. Read on to find out how!

Editorial translation by Impulso.
Git and GitHub are nothing new to people who code, but some still don’t know how to get the most out of these essential tools for any developer.
Whether you’re just starting to code or looking to stand out in your work, it’s worth taking a closer look at both. Shall we get started?
What are Git and GitHub?
Git is a free, open-source version control system. It lets you build and review a version history of the changes made to your development projects’ source code. It was created by Linus Torvalds, who is also known as the creator of Linux.
Other systems, such as SVN, serve the same purpose of tracking project versions, but Git has become one of the most popular among developers. Platforms that let you put Git to work include GitLab, Azure DevOps, and GitHub, which is our focus here.
To start with, you can think of GitHub as a remote repository that hosts Git projects. It’s a server that lets you see what changes each project contributor has made. That way, you can bring different versions of the code together while keeping track of their histories.
It’s also worth noting that GitHub integrates with a range of other services available online, making it easier to deploy applications automatically. This lets integration happen continuously, with no need for manual steps at this stage.
Another interesting point is that GitHub hosts many open-source projects that people can collaborate on. Let’s take a closer look.
The importance of solid projects and collaboration in IT
One of the main reasons Git and GitHub are so popular is that they let teams work together to build robust projects (anyone on an IT team knows how much this can benefit the company). At its simplest, collaboration is a set of practices that let people connect and share information and operations.
Here’s how it works. Teams use specialized software to work together in the cloud. They already use these tools every day to make communication easier (voice calls, video conferences, chats, file sharing, and much more). These tools are essential for everyone and even more important for developers who work remotely.
Benefits
- makes managers’ work easier, especially when it comes to managing project costs. Since the platform keeps a history, managers can see how the project evolved and how each developer contributed to the result. They can track the work, the time invested, and the initiatives launched, as well as understand the results. As the old saying goes, time is money!
- boosts productivity, since everyone involved gets on the same page about the project goal as they see how the work is progressing. With full access to the same files and information, no one has to waste time looking for data or dealing with miscommunication;
- encourages teamwork, addressing one of the biggest challenges companies face: getting different teams to work well together. Collaboration helps everyone work more effectively toward a common goal by involving them in carrying out the task.
It may sound simple, but Git and GitHub can make a big difference in all the areas we’ve mentioned. Let’s see how they work in practice!
How do you manage versions of your project hosted on these platforms?
For starters, a single project can store many different versions. If you’re unfamiliar with the tools, this can make tasks like restoring an earlier version tricky.
Developers can also use GitHub as a portfolio to show both the current project and how it has evolved over time. But before we get to that, you need to know how to create an account:
Step 1
This is the easiest part, and you probably already know how to do it. Just sign up on the official website for free. Once you enter your information, you’ll receive a confirmation email. Follow the instructions in the email to activate your account and start using it.
Step 2
Once your account is set up, it’s time to install Git. While you can use GitHub’s features on the platform itself, developers often use the CLI, also known as the command-line interface.
A full-featured CLI lets you work with both GitHub and GitLab. To get started, go to the official Git website and click the download button for the installer. There are versions for Mac, Windows, and other systems.
If you use Linux, you’ll need a few commands. To install Git from a binary package, you can use your system’s built-in package manager. There are two scenarios here:
- If you use Fedora, for example, you’ll need to use yum to install Git with this command: $ sudo yum install git-all;.
- If you use a Debian-based distribution such as Ubuntu, use the apt-get command: $ sudo apt-get install git-all.
You can also find instructions for installing Git on several other Unix systems. Git has an entire page of installation tips.
Step 3
It’s time to set up your GitHub account and start getting hands-on with the platform. You can set your name and email with the git config command. Since these settings apply globally, it’s worth adding the global option when setting them.
Once you run these commands, Git saves your email and name, and each change is added automatically. That brings us to the next step: storing information securely.
Step 4
You need to create a repository, which is your project on GitHub. Go to the platform and fill in the “Repository Name” field with a name that contains no spaces or special characters.
The “Description” field comes next. It’s optional, but it’s worth filling in so you can identify the project more easily.
Select the “Public” option and click “Create Repository”. A public repository lets anyone who visits the GitHub page see your project. This is where you’ll want to be especially careful!
First, make sure you don’t send sensitive data from your database to public repositories, since this can lead to serious information security problems. And remember that you can also create private repositories, limiting access to the people you actually need on the project. This is less useful if you want to use GitHub as a portfolio, for example.
Getting started with a GitHub repository
Picking up from step 4, you’ll need to create a folder in a safe location. Open a terminal and run a few commands using Visual Studio Code. If you haven’t installed it, you’ll need to follow a different process (it’ll be easier if you install it first).
With your repository ready, it’s time to add a few items. Here you need to specify which files belong in the project. Larger projects will use plenty of files, and you might want to keep some of them off GitHub. For the files you do want to send, you can use the “add”command: git add .\README.md.
If you’re working with multiple files and want to add everything at once, use the command git add --all. This tells the project which files belong there and should be tracked by Git, as well as which ones should go on the server.
Committing on GitHub
If you code, you’ve almost certainly heard the term “commit” at some point. In Portuguese, the term commit translates as “comprometer” (to commit). In programming, when someone makes a commit, it means they’re committing to all the changes they made to the code.
If other people are involved in the project, one person will be responsible for sending the information to the rest of the team. So committing doesn’t mean “sending the information to the remote repository (GitHub)”. It means the data is still only on your machine.
It’s important to avoid making too many commits without pushing them to the server. Likewise, you shouldn’t go too long without pulling down new changes.
The recommended approach is to focus on small parts of the software****. That way, you solve the problem, make the _commit_, and push it straight to the server. It’s worth downloading the latest version from the server to avoid problems.
Comments
Since we’re talking about commits, one of the most common things to do is add commit messages. Some teams don’t communicate this way, while others use commit messages all the time to stay on the same page.
Adding a commit message is easy: use the "-m" option to include your message when you commit. You’re now ready to push the data to the server.
Branches
Branches are simply offshoots of the code that let you create a specific version and make changes to it without risking changes to the original.
Every new repository has a default branch called Master. To see why that matters, consider the following example:
You’ve developed a new feature for the software you’re working on. As a result, it changes the system’s code and affects other parts that were working fine and took some time to develop.
Even if development started on the Master branch for some reason, a bug has now appeared and needs to be fixed as soon as possible. That’s why it’s common to have several branches in a single project, so it’s easier to make changes when there’s a bug. Ideally, you create a branch for each item you develop and then merge those branches into Master.
Pushing files to GitHub
First, send your files to a remote repository. Git uses the push command to send files, and you should always specify which branch you’re pushing from.
Since we’ll be working on the Master branch, we’ll set it as the default when we push, using the git “push -u origin master”command. Within a few seconds, all the files you pushed will go straight to the server. To access them, just go to the URL: https://github.com/USUARIO/meu-primeiro-repositorio.
Updating local files
This is one of the easiest features to understand. In English, the commands push and pull mean to send away and draw toward you, respectively. As we’ve pointed out, it’s important to keep sending files to the server. We’ll use the command “git push” to send them and, to get updates, the command “git pull”****_._ Since GitHub is such a collaborative environment, it’s important to download the latest code regularly.
Visual Studio Code integration
First, keep in mind that even if a guide shows you Git commands, you can perform the same actions directly in VSCode.
We mentioned it at the start of the article, and there are several reasons to come back to it. Git’s integration with VS Code is terrific, and you can get it working in just a few steps.
Press CTRL (CMD)+SHIFT+G to open the repository view. You’ll see all the changes there and can commit, push, and pull. Feel free to create more repositories to experiment with and come back to our step-by-step guide as often as you like.
How do you clone a repository on GitHub?
Now that you know how to create a repository, it’s time to learn how to clone one from GitHub. With the git clone command, you can clone an existing repository onto the same machine. This can come in handy in all sorts of situations! Say you’ve started work and the repository is already in use. Your best bet is to clone it, right?
To do this, close Visual Studio Code and delete the folder you created earlier. Then open a terminal and go to a safe folder, and enter the command git clone (https://github.com/USUARIOmeu-primeiro-repositorio.git). If you want to clone a repository again, use this command.
Well, you probably noticed the “.git” at the end, right? This means we have a local repository again, so we can run the push/pull commands and work with the files it contains.
There are ways to grow professionally with GitHub and use it to advance your career. Get to know the platform and see how it can help you build a portfolio that catches the eye of tech recruiters.
Git and GitHub: How can you grow your career as a developer?
You already know you can use GitHub to build an interesting portfolio. Now let’s look at a few ways to use it to your advantage when applying for a job.
Besides collaborating with your team, you can create Project Boards to manage the different stages of your projects. It works a bit like Trello, so if you’ve used that platform before, you’ll love this tip.
Finally, you can also use Wikis, which are simply sections that store a project’s documentation. Other people can securely access the information hosted there.
How to improve your chances in the hiring process with GitHub
- Describe your skills and share your projects. This is essential if you want to stand out to recruiters;
- Put some effort into a good Readme that describes the project.
Believe me, that’s already half the battle. If you want to go a step further, organize your repositories and write code that’s easy to understand.
Since it’s a social network, interacting with others is essential to growing your network and finding other projects and opportunities. And of course, give your project a license, using Choose a License to decide which one to use.
If everything is done correctly, GitHub will add a small icon at the top of the project. It’s worth doing, since it could help you stand out from other professionals.
Another tip is to create a repository for testing. That way, if one stage of the hiring process involves a hands-on test, you can ask the recruiter to create a repository. You can then fork the repository and make a commit. Some recruiters use this kind of assessment to gauge your familiarity with Git and your coding skills.
Time to take the first steps
Every developer should know at least a little about Git and GitHub. After all, they’re popular and free, and they help people in the field network. And now that we’ve covered all this, you can take your first steps on the platform without worrying about making mistakes.
If you want to learn more about using GitHub in practice and connect with others in the field, visit the Impulso GitHub repository. It’s free, and there’s a lot you can learn there! Finally, don’t forget to share this article with other developers and, of course, check out the other posts on our blog!


