I have created a project on github and integrated it with my RStudio. By mistake, I have committed a large file from my computer and now I want to revert back or discard that commit.
Can someone help me how I can do it via RStudio.
Thanks..!!
I have created a project on github and integrated it with my RStudio. By mistake, I have committed a large file from my computer and now I want to revert back or discard that commit.
Can someone help me how I can do it via RStudio.
Thanks..!!
You can use git reset --soft HEAD^
to remove the commit itself but keep the changes you've made. You can use git reset --soft HEAD^2
to do this for the last two commits. Then you can make a new commit.