I commit the file vie IntelliJ. But I didn't push.
How Can I remove this commit? I am new to GIT so pls clarify.
I checked other questions, it says only about commit. Not sure whether they pushed or not.
I commit the file vie IntelliJ. But I didn't push.
How Can I remove this commit? I am new to GIT so pls clarify.
I checked other questions, it says only about commit. Not sure whether they pushed or not.
Committing and pushing are two separate operations. Since you created a commit using IntelliJ it means you have one commit. Now when you push, git tries to push all your commits(in this case 1 commit) to remote. Since you haven't pushed you are just left with the Intellij created commit. so removing the commit is just an other operation.
git reset HEAD~1
should leave your original changes. For more info on undoing things check 12th slide in this presentation on Git http://vineelkumarreddy.com/index.php/2015/08/01/git-talk/
Hope this helps you :)