in the following image, when I git revert changeA, does my head stay at its original place and I have all the changes except for changeA?
Or I will loose all the changes from A to head and my head will be reset to the children of A ?
in the following image, when I git revert changeA, does my head stay at its original place and I have all the changes except for changeA?
Or I will loose all the changes from A to head and my head will be reset to the children of A ?
You will keep your history. What git revert actually does is add a new commit which undoes the changes of the specified commit.
source:
Neither of them, it will create a new commit reverting the changes you made, keeping the your history.
https://www.atlassian.com/git/tutorials/undoing-changes/git-revert