Reverting master to a few commits back
I want to revert a few commits I pushed from master to master.
When i push to github through vs code this msg show me
! [rejected] main -> main (fetch first)
error: failed to push some refs to ‘github.com:Myself-Alien/odin-recipes.git’
hint: Updates were rejected because the remote contains work that you do not
hint: have locally. This is usually caused by another repository pushing to
hint: the same ref. If you want to integrate the remote changes, use
hint: ‘git pull’ before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push –help’ for details.
How to remove some commits with their contributions included without deleting the whole repo?
I recently made an excessive number of commits to a GitHub repository while editing my github profile. Now, I’d like to remove some of those commits without completely deleting the entire repository. However, I’m concerned about my contribution history.