Useful Git Commands

July 17, 2019 (Last edited: July 27, 2019)

Useful Git commands:

Command Description
git clean -fd Delete untracked files and folders
git push origin --delete <BRANCH_NAME> Delete remote branch
git reset -- <DIRECTORY_FILE_PATH> Unstage a file/directory and its contents
git rebase -i HEAD~<N> Squash multiple (N) commits into a potentially single commit
git alias Display a list of available aliases