About working with repository history in Source Tree.
At 1.) Haven't seen anything like this in any Git-GUI yet ....
At 2.) Yes you might revert both changes via two 'git revert' commands with commits meantime ... Just to be sure to revert the correct commits, I prefer to use "git reset <CommitId>' rather than HEAD~1.
2.) So if I want to revert to HEAD-2, I do need to call twice revert? Is there a simper way to revert (without using reset that is destructive command)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes you would need call revert twice.
I think "git revert" is the simplest way to revert - and it is IMHO the "easiest to reproduce" way (esp. for your fellow developers)...
Have a look here: http://stackoverflow.com/questions/1463340/revert-multiple-git-commits
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the link. I've found in a comment to an answer this shortcut: git revert --no-commit D C B . I haven't tried yet, but it seems possible to revert multiple commits in one line, and then commit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sounds good - but I personally would be scared about what happens on reverting multiple commits at once in case of having edited the same portions of code in different commits: Hopefully git reverts the changes back in "the correct order" ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Probably reverts in the order specified, but check the documentation to confirm. You generally want to revert the most recent first.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I Wonder what happens if I do incremental manual revert in this case, using oldest first (and most recent at last) ... Have to check this out as soon as I find some time
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've actually found this: git revert --no-commit D C B . I haven't tried yet, but it seems possible to revert multiple commits in one line, and then commit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.