What changed in the last commit
git show --name-status
Log one line
git log --oneline
Revert to the HEAD of the branch and lose all changes
git reset --hard HEAD
View local and remote branches
git branch
git branch -a
Delete local and remote branches
git branch -D <branch_name>
git push <remote_name> --delete <branch_name>
Push branch to remote
git push -u <remote_name> <branch_name>
Show your Git user details
git config --list
Unstage files
git reset -- <filePath>
Add every file expect
git add -u
git reset -- <file_name>
Checkout new local branch from origin
git checkout -b test origin/test
Remove all your local git branches but keep master
git branch | grep -v "master" | xargs git branch -D
Diff of git commit with its parent
git diff <commit>^!
git tag release18 49c77e7fad5b75b6cdf3e366a15ebeff6b4c53cc -f