2 ms·
All my git training starts with a whiteboard and drawing out a commit tree and branch pointers. I only talk about the commands in reference to the drawings, no
by jdmichal 5y ago
All my git training starts with a whiteboard and drawing out a commit tree and branch pointers. I only talk about the commands in reference to the drawings, not the other way around. Most commands are manipulating this commit tree, so it gives a visual to latch understanding onto.
`git reflog` shows the commits where your current branch pointer has been.
`git reset --hard` moves your current branch pointer and to the given commit, then modifies your working directory to match that commit. `--soft` moves the branch pointer and does not modify your working directory. `--mixed` moves the branch pointer, does not modify your working directory, but does clear staging.