https://tecadmin.net/delete-commit-history-in-github/
Delete Commit History in Git Repository
Follow the below steps to complete this task.
- Create Orphan Branch – Create a new orphan branch in git repository. The newly created branch will not show in ‘git branch’ command.
- Add Files to Branch – Now add all files to newly created branch and commit them using following commands.
- Delete master Branch – Now you can delete the master branch from your git repository.
- Rename Current Branch – After deleting the master branch, let’s rename newly created branch name to master.
- Push Changes – You have completed the changes to your local git repository. Finally, push your changes to remote (Github) repository forcefully.
没有评论:
发表评论