How to remove staged changes from git?
To remove your stagged changes or to undo your last git add
command you can simply use git reset
. Running the below command will simply remove all files from your staging area.
To remove your stagged changes or to undo your last git add
command you can simply use git reset
. Running the below command will simply remove all files from your staging area.
There are many ways of doing this, some include custom scripts, app and even some paid services. We will do this using the simplest way of having multiple urls for a single remote.
Initially, when I started working on git, I was terrified of squashing commits, I always feared that I will do it wrong and will lose some code, but it's very simple once you understand the underlying logic.
Doing a diff is very simple and easy, just rememeber the following command and your set for life.