| ... | ... | @@ -104,7 +104,7 @@ Users are urged to provide as much context as possible in their commits. |
|
|
|
|
|
|
|
A commit should be atomic, meaning that 1 commit must contains changes that :
|
|
|
|
|
|
|
|
1. Work.
|
|
|
|
1. Are functionnal. If they are currently not, its ok, everybody does "checkpoints commits" during the development process. But final commits that will be merged in dev/main need to be functionnal. To modify commits, head to \[git rebase --interactive\]()
|
|
|
|
2. Can be grouped under 1 common designations (the commit message).
|
|
|
|
3. This designation is the shortest common denominator.
|
|
|
|
|
| ... | ... | @@ -322,7 +322,7 @@ git rebase -i <hash> |
|
|
|
|
|
|
|
Here is my current history.
|
|
|
|
|
|
|
|
{width=734 height=116}
|
|
|
|
{width="734" height="116"}
|
|
|
|
|
|
|
|
We can see issues here :
|
|
|
|
|
| ... | ... | @@ -338,7 +338,7 @@ git rebase -i f9d74d9 |
|
|
|
|
|
|
|
This will open your default text editor (configured with `$EDITOR`) with this inside :
|
|
|
|
|
|
|
|
{width=600 height=490}
|
|
|
|
{width="600" height="490"}
|
|
|
|
|
|
|
|
We can see 2 parts :
|
|
|
|
|
| ... | ... | @@ -368,10 +368,10 @@ Now I will save and quit my editor and this will open new editors to choose the |
|
|
|
|
|
|
|
1. For reword :
|
|
|
|
|
|
|
|
{width=614 height=269}
|
|
|
|
{width="614" height="269"}
|
|
|
|
2. For the squashed commits (here I will remove the last 2 commits messages as they are useless)
|
|
|
|
|
|
|
|
{width=575 height=521}
|
|
|
|
{width="575" height="521"}
|
|
|
|
|
|
|
|
Once every thing is done, here is my new git history all cleaned up :
|
|
|
|
|
| ... | ... | |