vlogstack
Ask

Git

Commits, branches, remotes and the messages Git prints when something goes wrong.

13.6MviewsStack Overflow

Delete a Git branch locally and remotely

git branch -d removes your local copy (-D forces it when the branch is not merged); git push origin --delete removes the copy on the remote.

Gitgit-branchdelete-branchdelete-remote-branchCodeman · ep. 02Solvedupdated Nov 23, 2026
16.8MviewsStack Overflow

Undo your last Git commit (keep or drop the changes)

git reset --soft HEAD~1 removes the last commit and keeps your changes staged; git reset --hard HEAD throws the changes away too.

Gitgit-resetgit-reset-softgit-reset-hardCodeman · ep. 01Solvedupdated Nov 23, 2026

Error messages

All errors →