Loading topic guide...
Git is a content-addressable directed acyclic graph (DAG) storage system disguised as a version control tool.
Feature: C --- D
/
Main: A --- B ----------- M (Merge Commit)
\ /
(or Rebase: A --- B --- C' --- D')
# Undo last commit without losing changes on disk git reset --soft HEAD~1 # Stash untracked files too git stash -u # Interactive rebase last 3 commits git rebase -i HEAD~3
Soft reset unwinds the commit object back to the staging area. git stash -u stashes uncommitted and untracked files.