8 underrated Git commands every programmer should know (not the usual pull, push, add, commit)
Too Long; Didn't Read
The Git command is used to rename a local branch and change the upstream branch to a new branch. This will help to recover from those stupid typos that creep into our commits. Use reflog command to find the head number of the required commit. Use stash to temporarily work on another branch without committing our current work. Recover stash by going into that branch and going into the stash list. If you want to recover stash and drop it from stash list use git stash pop. You can also recover stash from that branch using Git stash apply.