- [Count the differences between two branches](#count-the-differences-between-two-branches)
- [See the default branch](#see-the-default-branch)
- [Force a push](#force-a-push)
- [Merge a branch to a different branch](#merge-a-branch-to-a-different-branch)
- [Clone completely one branch to another branch locally then push the changes to Github](#clone-completely-one-branch-to-another-branch-locally-then-push-the-changes-to-github)
- [The 3 levels of the command reset](#the-3-levels-of-the-command-reset)
- [Reverse modifications to a file where changes haven't been staged yet](#reverse-modifications-to-a-file-where-changes-havent-been-staged-yet)
- [Download binaries from Github](#download-binaries-from-github)
- [Resolve conflicts between branches](#resolve-conflicts-between-branches)
- [Download all repositories of an organization](#download-all-repositories-of-an-organization)
- [Revert a push commited with git](#revert-a-push-commited-with-git)
- [Make a backup of a branch](#make-a-backup-of-a-branch)
- [Revert to a backup branch](#revert-to-a-backup-branch)
- [Start over local branch and pull remote branch](#start-over-local-branch-and-pull-remote-branch)
- [Overwrite local files and pull remote branch](#overwrite-local-files-and-pull-remote-branch)
- [Stash command and parameters](#stash-command-and-parameters)
- [Code Editors](#code-editors)
- [VS-Code](#vs-code)
- [VS-Codium](#vs-codium)
- [References](#references)
***
## Introduction
In this section, we cover basic commands and aspects of [GitHub](https://github.com/) and [Git](https://git-scm.com/).
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
GitHub is a platform and cloud-based service for software development and version control using Git, allowing developers to store and manage their code.
## Install Git
You can install git on MAC, Windows and Linux. You can consult Git's documentation learn how to [install git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
* Discard last commit, add and any changes you made on the codes
Note 1: If you're using **--hard**, make sure to run git status to verify that your directory is clean, otherwise you will lose your uncommitted changes.
Note 2: The argument **--mixed** is the default option, so **git reset** is equivalent to **git reset --mixed**.
### Reverse modifications to a file where changes haven't been staged yet
You can use the following to reverse the modifications of a file that hasn't been staged:
We show how to resolve conflicts in a development branch (e.g. **branch_dev**) and then merging the development branch into the main branch (e.g. **branch_main**).
### Start over local branch and pull remote branch
To start over your local branch and pull the remote branch to your working environment, thus ignoring local changes in the branch, you can do the following:
```
git fetch
git reset --hard
git pull
```
Note that this will not work for untracked and new files. See below for untracked and new files.
### Overwrite local files and pull remote branch
This method can be used to overwrite local files. This will work even if you have untracked and new files.