Category: Uncategorized

0

Revert many commits in git

Logically speaking, the simplest way to revert several commits in git without losing commit history is by creating a new commit that represents the revert. Note that its NOT a good practice to revert...

0

Squash multiple commits into one

Premature commits happen all the time. And often you want to squash all those premature commit into one meaningful commit ┬áto keep your commit history clean, easily┬áreadable and more meaningful. It’s quite easy to...

0

Git amend previous commit

Rewriting commit history with git Premature commits happen by accident more often than not. Sometimes you just missed adding a file or maybe you realized that you should have added a much more descriptive...

0

Create a new branch from your git stash

Sometimes when you have a tonne of changes you realize that you probably want to keep all of them in a new branch instead of as a new commit in the current branch. Normally...