Git is an awesome tool 😄
Lost files could be recovered from the server.
Because the code is not located only locally on the computer, but also on a server, it can be accessed from anywhere in the world.
Snapshots of a project are stored with an easy access.
Recorded snapshots make it easy to undo mistakes and go back to a working version.
A bug can be tracked back to its origin by finding out exactly when it started occurring. Git has a cool tool for binary search over commits (git bisect).
- Many developers can work on the same code.
- Several features could be worked on simultaneously, and switched between
- An idea can be easily discarded if it turns out to be a bad one
Let's start with the definition of some important terms that are used to create the Git world.
A repository ("repo") is a directory that stores the content of a project, and some additional metadata. The repo stores the files themselves, the versions of those files, commits, deletions, and more.

A fork is a copy of a repository at a certain point at time.
The conventional name for the primary version of a repository, in the remote server.
A branch is a version of the repository that diverges from the main working project.
A commit is a snapshot of the repo at a certain time.
A PR is a request for merging all commits from one branch to another, enabling multiple colaborators to discuss the proposed changes before integrating them into the official project.

An upstream branch is the branch tracked on the remote repository by the local branch
There are two ways to work with Github - HTTP and SSH. Working with HTTP was probably simpler until Github changed the privacy conditions and decided to add personal access tokens with an expiration date. An explanation about token creation could be found here. The recommended way is using SSH. It is easy to configure, and once you counfigure it you don't need to think about it anymore. To use SSH you need to generate a key, and add it to GitHub, as explained here.
Content...
Content...
- Branch per feature + how to sync from different computers + when should I open a new branch and how (where to branch from)?
- Working with PRs
- Multiple contributors projects
Some of the explanations are taken from here. You may find this guide useful.
git init- initialize an existing directory as a Git repositorygit clone <URL>- locally retrieve an entire repository from a remote locationgit branch- list all local branches. An asterisk represent the current branchgit checkout- switch to another branch and check it out into the working directorygit checkout -b <branch-name>- create a new branch at the current commitgit status- show modified files in working directory





