If you commit too early and possibly forget to add some additional changes, add files, or you mess up your commit message then
you can make the additional changes you forgot, stage them, and commit again using the --amend option:
git commit --amend
You end up with a single commit — the second commit replaces the results of the first.
Effectively, it's as if the original commit never happened,
and it won't show up in the repository history with git log --all.
The original commit will eventually be cleaned up by Git's garbage collection.
Amending a commit is essentially throwing away the original one and making a new one.
There is no link between them.
Only amend commits that are still local and have not been pushed somewhere.
Amending previously pushed commits and force pushing the branch will cause problems for your collaborators.
How is amending handled in KEDEHub?
Since the original commit is not part of the repository history it will not be considered by KEDEHub when calculating KEDE
How to lie with amending in KEDEHub?
There might be people who would like to game KEDEHub in order to get higher KE$DE.
There are several ways to create false, fraudulent commits using amending existing commits.
You can run git commit --amend --reset-author.
This copies the existing commit to yet another new commit, whose parent is the parent of the existing commit.
The new commit has whoever you specify) as the author and current date and time.
You can also change the author date only with the --date parameter.
So, if you want to amend the last commit, and update its author date to the current date and time, you can do:
git commit --amend --date=now