audio-engineer / aau-p2-article

AAU SW2 P2 project article
0 stars 0 forks source link

Commit history cleanliness #110

Closed MadsHeilmann closed 5 months ago

MadsHeilmann commented 5 months ago

For reasons such as accidentally forgetting to lint the code before pushing or having to make changes to one's commit consider just editing the original commit instead of making a new commit for the changes. This way the commit history in main is prettier and easier to look through as there will be less commits names something like "textidote fix".

Commands extensions such as --amend --no-edit when commiting changes edits the head commit of the branch instead of creating a new commit. Example use is git commit --amend --no-edit. However, make sure to remember to only do this after you have already made a commit the normal way using something like git commit -m "XXX".

audio-engineer commented 5 months ago

Why is this created as an issue? I agree, just want to add that the option is --no-edit, and can be omitted exacty if you messed up the commit message and want to edit it before pushing

MadsHeilmann commented 5 months ago

Why is this created as an issue? I agree, just want to add that the option is --no-edit, and can be omitted exacty if you messed up the commit message and want to edit it before pushing

Just for awareness. Did not know where else to put it.

audio-engineer commented 5 months ago

Teams chat?