We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Undoing Things and saving your Neck with Git | Tobias Günther
Learn advanced Git techniques to recover from mistakes, manipulate commit history, and improve collaboration with Git reflog, reset, rebase, and more.
-
Git
reset --hard
and--mixed
are used to undo local changes. -
git reflog
is used to view the commit history and recover deleted commits. -
git rebase
is used to manipulate the commit history, andgit interactive rebase
is used to squash and reorder commits. -
git fix up
is used to combine multiple commits into one. -
Use
git amend
to modify the last commit. -
Use
git revert
to undo a commit without changing the history. -
Use
git checkout
to switch branches andgit branch
to create a new branch. -
git reset
is used to reset the branch to an earlier state. -
Use
git commit --amend
to modify the last commit. -
Use
git add
andgit commit
to stage and commit changes. -
The
--mixed
option is used to keep changes as local changes. -
git rebase
is used to rewrite the commit history. -
Use
git interactive rebase
to squash and reorder commits. -
Use
git fix up
to combine multiple commits into one. -
Use
git amend
to modify the last commit. -
Use
git reset
to reset the branch to an earlier state. -
Use
git cherry-pick
to apply a commit from another branch. -
The
reflog
is used to view the commit history. -
Use
git revert
to undo a commit. -
Use
git interactive rebase
to squash and reorder commits. -
Use
git fix up
to combine multiple commits into one. -
Use
git amend
to modify the last commit. -
Use
git reset
to reset the branch to an earlier state.