2018-10-23 20:25:08 +02:00
|
|
|
# Git
|
|
|
|
|
2018-11-28 01:00:11 +01:00
|
|
|
[Git][git] is the standard version control tool.
|
2018-10-23 20:25:08 +02:00
|
|
|
|
2018-11-20 03:58:18 +01:00
|
|
|
# Use Cases
|
2018-10-23 20:25:08 +02:00
|
|
|
|
2018-11-20 03:58:18 +01:00
|
|
|
Git can be used to:
|
2018-10-23 20:25:08 +02:00
|
|
|
|
2018-11-20 03:58:18 +01:00
|
|
|
- Keep track of file changes over time
|
|
|
|
- Keep a record of all contributors to a code base
|
|
|
|
- Rollback to a previous version of a project
|
|
|
|
- Create snapshots of a project with tags (also known as versions)
|
2018-10-23 20:25:08 +02:00
|
|
|
|
2018-11-20 03:58:18 +01:00
|
|
|
You should not use Git if:
|
|
|
|
|
|
|
|
- You are dealing with binary files
|
|
|
|
- You are dealing with large files that change often
|
2018-10-23 20:25:08 +02:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2018-11-20 03:58:18 +01:00
|
|
|
First, install [diff-so-fancy][diff-so-fancy], an amazing git diff utility.
|
|
|
|
|
|
|
|
Then, create a `~/.gituser` with the following:
|
2018-10-23 20:25:08 +02:00
|
|
|
|
|
|
|
```gitconfig
|
|
|
|
[user]
|
|
|
|
name = <the name you use for git commits>
|
|
|
|
email = <the email you use for git commits>
|
|
|
|
signingkey = <the subkey you use to sign git commits>
|
|
|
|
```
|
|
|
|
|
2018-11-20 03:58:18 +01:00
|
|
|
[git]: https://github.com/git/git
|
|
|
|
[diff-so-fancy]: https://github.com/so-fancy/diff-so-fancy
|