Git is a version control system, created by the owner of Linux. This control system allows the user to register new updates made over a code, storing this information.
GitHub is an online platform where you create and store repositories to host projects and collaborate on open-source projects, working together with others.
GitHub is also a social network for developers, in addition to being a tool for teamwork.
A more detailed walkthrough I did on how to upload code to GitHub:
Passo a passo de como usar código Git
Step by step on how to use Git code
Branches outside the main “Main” line are basically copies, which do not affect the main versioning of the project.
git init
git clone <repository>
git status
git add -A
git commit -m "Mensagem"
git log
git push <branch> <remote-repository>
git pull <branch> <remote-repository>
git commit --amend
git checkout
git branch