// Revert everything to the <commit_hash_you_want_to_restore_to>
// Rest commit local branch
git revert --no-commit <commit_hash_you_want_to_restore_to>..HEAD
// Push to remotegit commitgit push
https://stackoverflow.com/questions/4114095/how-do-i-revert-a-git-repository-to-a-previous-commit
// Revert current commit on local branch git revert --no-commit <current_commit_you_want_to_remove>// remote current commit on remote branch git commitgit push
// revert a list of commit up to the<commit-hash > local branch git reset --hard <commit-hash>// status checkgit statusYour branch is behind 'origin/remote' by N commits, and can be fast-forwarded.// revert a list of commit up to the <commit-has> forcefully to remote by using -f origin <remote>
git push -f origin <your_remote_repo_name>https://stackoverflow.com/questions/5816688/resetting-remote-to-a-certain-commithttps://stackoverflow.com/questions/24730127/git-commit-gives-error-empty-commit-set-passed
// Discard local changegit reset --hardhttps://stackoverflow.com/questions/1146973/how-do-i-revert-all-local-changes-in-git-managed-project-to-previous-state
No comments:
Post a Comment