Reputation: 26
I have a situation, where
Now if I want to remove code written between v.0 and v.1 and I also want to remove tag v.1 How can I achieve this?
Upvotes: 0
Views: 43
Reputation: 13589
This requires you to "rewrite history", which is generally considered a bad idea if your repository is public. But essentially you need to make all of these changes locally and then force push your local changes to origin. I believe this would look like:
git rebase -i v.0
# delete the desired range of commits by deleting lines in the `git-rebase-todo` file that is presented
git tag --delete v.1
git push --force-with-lease
Upvotes: 0