I have made some changes to my code and then did a: git add . git commit git push origin master.
Now i realise that i have made some mistakes and i want to get back the code of the previous commit and then re do the changes and push them back to the server.
This is the git log output:
commit 3254c7668610a86eb930798c3c50fb5e1c298cbf
Author: Subhayan Bhattacharya <subhayan.bhattacharya@hpe.com>
Date: Wed Sep 6 00:53:39 2017 -0700
Made changed to downloadpkgapp.sh
commit c6577344eaa7ed1ac7fc911892cf85f66a0ac0b9
Author: Subhayan Bhattacharya <subhayan.bhattacharya@hpe.com>
Date: Wed Aug 16 02:56:17 2017 -0700
commiting changes to file CallProgram.py
commit 3839fa51edb20812c10d96f40b36aaa4fada9200
Author: dheeraj.mittal <dheeraj.mittal@hpe.com>
Date: Sun Jun 11 11:17:41 2017 +0200
added execute permission command for application package
Someone please help me with the same. I have trouble understanding GIT a lot. So if someone can also explain whatever steps are suggested that would be great.