Delete Github commit history

后端 未结 4 1805
天涯浪人
天涯浪人 2021-01-30 03:39

Is there anyway for me to delete my github commit history? I don\'t want to lose all my commits, just the last 10 or so that were pushed to github. I can\'t seem to figure out h

4条回答
  •  旧巷少年郎
    2021-01-30 03:50

    With Git installed, you could also right-click your repository folder - Git GUI Here.

    Select Repository - Visualize All Branch History.

    Right-click the desired commit - Reset master branch history to here.

    Now you have 3 options:

    Once chosen, select File - Reload.

    Managed to figure this out after selecting Revert on a commit in GitHub Desktop, then Revert again so we're back to the original code, then simply wishing to clean up these couple Revert commits.

提交回复
热议问题