https://learngitbranching.js.org/ is very good for learning how Git branching works.
Once you're done with the tutorial bit, the https://learngitbranching.js.org/?NODEMO version is good to try out commands and see what the tree looks like after each command.