3 ms·
create alias dont-fuck-with-my-branch git reset --hard HEAD~1 git push -f :)
by bdangubic 2y ago
create alias dont-fuck-with-my-branch
git reset --hard HEAD~1
git push -f
:)
- chipdart 2y agoServices like GitHub and GitLab support preventing changes that overwrite a repo's history, in addition to tracking history even when you force update a branch.
- bdangubic 2y agoI was just joking but surely I can revert a commit on a feature branch, no?
- chipdart 2y agoYou can revert and even force-update the branch to rewrite it's history, but GitHub still tracks the old commits and even lists in the PR the events that rewrote the branch history.
- bdangubic 2y agosorry for misunderstanding, I am NOT trying to hide the fact I reverted, hence the alias dont-fuck-with-my-branch :) and I was overall just joking…