In case you accidentally commit file you did not want, e.g. .swp from vim use: git rm unwanted_file.swp Check if file does not appear anymoregit commit --amend