Git and GitHub

Where to upload each thing

Git is a piece of software that lets you save the changes you make to the code you are creating, so that if you change something that broke more than it fixed, you can easily go back. GitHub is the most widely used platform for hosting repositories that use Git (i.e. the “folders” with code where we keep our changes, the project’s evolution). With GitHub you can contribute to other repositories (hosting the code of other programs) and file bug reports.

Git

Installing Git

Use this AI chat so it explains exactly how to do it on your operating system

Essential commands

To move to your project folder from the terminal you use the cd command. Learn more about it in this AI chat

The first thing to do when entering the folder is to run git init to tell git you want to use it there, and it will start a repo. When you make a series of changes to the code, run git status to see what you have not yet committed (tracked the change), then run git add plus the file or git add . for everything. Then run git commit -m "your message" and you are done!

GitHub

GitHub, as we said, lets you host the code you create and open Pull Requests. First you need to create an account by signing up from here, for example Now go to this chat so the AI explains how to configure your PC to push from git to GitHub

Now simply create a repository, copy the git@… URL shown when you click the Code button on the created repo (or the one given on creation), then run git remote add origin git@... and git push origin main

Any doubts or questions?

Join the Inled community