Home > OS >  Is there a possibility to revert a commit and pushed file in Git?
Is there a possibility to revert a commit and pushed file in Git?

Time:10-20

I've pushed a commit to GitHub and then realized I did'nt wanted to commit that files I entirely want to remove that added files from git.Is that possible?

CodePudding user response:

You can just use git revert for that

CodePudding user response:

You can use git reset --soft HEAD~1 to remove your last commit. Then all added files will be again marked as modified and you could pick which files you want to add to your commit

  • Related