3 ms·
An easy way to do that, is the way I tend to do it; Create a new branch based off the one you're rewriting history in, and that will actually keep all of that
by simcop2387 13y ago
An easy way to do that, is the way I tend to do it; Create a new branch based off the one you're rewriting history in, and that will actually keep all of that for you even after you rewrite it all. Makes it really easy to restore later with git reset if you need it.
- Myrmornis 13y agoYes, this is how beginners should be taught to "back up" in git.
- simcop2387 13y agoIn the interest of making this easier: git branch branchname-backup #do dangerous stuff ... # whoops I just broke the branch really bad I'll start over git reset branchname-backup