Reapply stashed changes without removing from stash
git stash -u
Stash changes, including untracked files
git clean -f
Force delete untracked files in the working directory
git clean -fd
Force delete untracked files, directories, and subfolders
git reset --hard
Reset tracked files to the last commit state
git checkout -b <branch_name>
Create and switch to a new branch
git checkout <branch_name>
Switch to an existing branch
git merge <branch_name>
Merge <branch_name> into the current branch
git rebase <branch_name>
Reapply commits from your current branch on top of <branch_name>
git branch --list
List all local branches
git branch -d <branch_name>
Delete the specified branch (if merged)
git branch -D <branch_name>
Force delete the specified branch
git cherry-pick <commit>
Apply a specific commit from another branch onto the current branch
What is the HEAD?
HEAD refers to the latest commit that your current branch is pointing to.
It's essentially a reference to the current branch, indicating where you are in the commit history.