Good git commands that correct bad git commits

In this blog, we shall look into few different ways to rectify bad git commits. We shall simulate different situations that will give us a clear idea, what went wrong and how to correct it.Without any further delay, let’s begin! Situation one : getting back the previous code After doing certain changes, suddenly we realized that the new code is not fruitful. Therefore, we want to get back to the previous stage. As, we have not committed the new changes, we can easily get back by executing git checkout. The command as follows: $git checkout filename Situation two, change commit

Read More