Throw away local commits in git -
due bad cherry-picking, local git repository 5 commits ahead of origin, , not in state. want rid of these commits , start on again.
obviously, deleting working directory , re-cloning it, downloading github again seems overkill, , not use of time.
maybe git revert
need, don't want end 10 commits ahead of origin (or 6), if code right state. want pretend last half-hour never happened.
is there simple command this? seems obvious use case, i'm not finding examples of it.
if excess commits visible you, can git reset --hard origin/<branch_name>
move origin is.
doing git revert
makes new commits remove old commits in way keeps everyone's history sane.
Comments
Post a Comment