Change Git Config

Force push

Force push (to newly added remote)

Undo Everything after last commit

Delete all untracked files

git clean -f

Delete all untracked files and directories

git clean -fd

Git create a branch and switch

git checkout dev # Create dev branch and switch

Git stash and change branch and come back and unstash

# Assuming you're working on dev branch# And have to switch to master without losing changes in dev
git stash # Stashed non commited code
git checkout master # Now we are in master
git checkout dev # We are in dev
git stash apply # Added stashed code back to our files