unstaged changes in git code example Example 1: commit unstaged changes to new branch git checkout -b new_branch_name Example 2: git delete unstaged files git clean -df