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 --hardand--mixedare used to undo local changes. -
git reflogis used to view the commit history and recover deleted commits. -
git rebaseis used to manipulate the commit history, andgit interactive rebaseis used to squash and reorder commits. -
git fix upis used to combine multiple commits into one. -
Use
git amendto modify the last commit. -
Use
git revertto undo a commit without changing the history. -
Use
git checkoutto switch branches andgit branchto create a new branch. -
git resetis used to reset the branch to an earlier state. -
Use
git commit --amendto modify the last commit. -
Use
git addandgit committo stage and commit changes. -
The
--mixedoption is used to keep changes as local changes. -
git rebaseis used to rewrite the commit history. -
Use
git interactive rebaseto squash and reorder commits. -
Use
git fix upto combine multiple commits into one. -
Use
git amendto modify the last commit. -
Use
git resetto reset the branch to an earlier state. -
Use
git cherry-pickto apply a commit from another branch. -
The
reflogis used to view the commit history. -
Use
git revertto undo a commit. -
Use
git interactive rebaseto squash and reorder commits. -
Use
git fix upto combine multiple commits into one. -
Use
git amendto modify the last commit. -
Use
git resetto reset the branch to an earlier state.