With the release of Visual Studio 2019 16.8 Git became the default source control experience. It no longer lives inside Team Explorer but got its own menu item.
Read the announcement for more details.
One of the things I noticed when using the new Git experience was the first class support for ‘git amend’. But what does ‘git amend’ do?
Let me explain…
The git commit --amend
command is a convenient way to modify the most recent commit. It lets you combine staged changes with the previous commit instead of creating an entirely new commit. Amending does not just alter the most recent commit, it replaces it entirely, meaning the amended commit will be a new entity with its own ref. It is a way to rewrite the git history.
Warning: Avoid amending a commit that other developers have based their work on. To be safe only amend local commits.