Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
How can I undo my last git commit?
git commit only to realize you forgot to add a file or that you made a mistake. We all do it, but we can never remember how to undo it! What is the command to undo a git commit?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×