I have partial answer to your question. I don't know tortoisegit
so what are the black and red lines in the graph? I imagine the green is master
branch. Is this image for local repo? What is your current branch name?
Using git on commandline/terminal window you can do following.
You can move HEAD
to any commit. For brevity, lets say the SHA of Jan 10th 17:40:56
commit is c
. If this is your commit history/log.
a----b----c----d----e <-- master branch
^
HEAD
So, doing git checkout c
should set the HEAD
where you want leaving the later commits in place.
a----b----c----d----e <-- master branch
^
HEAD
This is called detached
state. If you do git branch
, it says so. You can continue to do new commits from this point, but since they are not referenced by any branch, git can garbage collect them.
Alternately, if you want to delete commits d
and e
and move HEAD
to c
, do git reset --hard c
. If you want to leave d
and e
changes in there but move HEAD
and master
branch to c
, do git reset --soft c
. You'll see the d
and e
as changes to be committed in git status
.