| ... | ... | @@ -72,18 +72,41 @@ git clone <repository> [<dest_dir>] |
|
|
|
```
|
|
|
|
|
|
|
|
repository is either ssh or https address of the repo.
|
|
|
|
|
|
|
|
## commit
|
|
|
|
|
|
|
|
## Commit
|
|
|
|
A commit is like a checkpoint : you have modified multiple files, and you [push](#push) them to the [origin](#origin) with a commit message like "hey I've done this and that".
|
|
|
|
|
|
|
|
A commit can but doesn't have to contain all your modified files, it will only include [added](#add) files. any commit will be accompanied by a **commit message** that NEEDS to contain the important things that has been modified in the added files.
|
|
|
|
A commit can but doesn't have to contain all your modified files, it will only include [added](#add) files. Any commit will be accompanied by a **commit message** that NEEDS to contain the important things that has been modified in the added files.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
git commit
|
|
|
|
```
|
|
|
|
|
|
|
|
will open a text edition in the terminal where you be able to create the message
|
|
|
|
Each git commit can then bee seen in your history using git log.
|
|
|
|
#### How to make a proper commit ?
|
|
|
|
##### How to write a commit message ?
|
|
|
|
⚠To help with the readability of the commit history, every git message MUST [follow the convention](https://www.conventionalcommits.org/en/v1.0.0/)
|
|
|
|
|
|
|
|
```text
|
|
|
|
Chore : This is a commit message example. This line will serve as commit title.
|
|
|
|
|
|
|
|
The following Lines will be used to provide more context to someone that wants to inspect this given commit. Users are urged to provide as much context as possible in their commits.
|
|
|
|
```
|
|
|
|
##### What should a commit contain ?
|
|
|
|
A commit should be atomic, meaning that 1 commit must contains changes that :
|
|
|
|
1. Work.
|
|
|
|
2. Can be grouped under 1 common designations (the commit message).
|
|
|
|
3. This designation is the shortest common denominator.
|
|
|
|
> **🧠 Example :**
|
|
|
|
> You created a branch to add the opeator `Foo` in aidge_core. While working, you discovered an issue in another file that is not related to the `Foo` operator, and completed the README with a new .
|
|
|
|
> This will result in 2 commits that will be written following the commits conventions explained above :
|
|
|
|
> 1. `feat : adding support of operator Foo` that will contain all modifications related to foo, it can (and should) cover multiple files.
|
|
|
|
> 2. `chore: completed README.MD with missing informations about ....`
|
|
|
|
> 3. Note That this is multi line commit as shown just above
|
|
|
|
> ```
|
|
|
|
> fix: Added assertion to avoid buffer Overflow in Bar::baz(n)
|
|
|
|
>
|
|
|
|
> previously, when n was above `int8` limit Bar::baz(n) could overflow, An assertion was added to avoid that and provide a more meaningful error message."
|
|
|
|
> ```
|
|
|
|
|
|
|
|
## diff
|
|
|
|
|
| ... | ... | |