How do I undo the most recent local commits in Git
Channel:
Subscribers:
962
Published on ● Video Link: https://www.youtube.com/watch?v=COzW3Bre8v4
In case you accidentally committed the wrong files to Git, but didn't push the commit to the server yet. Then you can I undo those commits from the local repository.
1. git commit -m "Something wrong" # (Your Accident)
2. git reset HEAD~
[ edit files as necessary ]
3. git add .
4. git commit -am "New message"
01:45 Git Undo Local Commits
How do I undo the most recent local commits in Git?
https://youtu.be/COzW3Bre8v4
Other Videos By UXDWorldz
Tags:
git
version-control
git-commit
undo
How do I undo the most recent local commits in Git
git undo commits
git reset local commit
git cancel commit
undo git commits
git reset
version control
git revert
git revert commit
git checkout
git revert to specific commit
git undo
how to undo my last commit
git revert tutorial
undo commits in Git
git undo commit
git revert commit after push
git reset hard