My colleague has pushed to our git repository a mistake. I wish to commit some updated code, but I had not git pulled and as a result am 1 commit behind the HEAD. How can I ignore his changes completely and override his mistake if I am behind?
Share
I guess you mean he pushed a bad commit to a central repo.
If so, then you can push your version using
git push -fand this will override the repository. Of course, this will also break history (fmeans force) so your colleague(s) will have to re-clone the central repo.