cant delete commits from gitorious server installed

65 Views Asked by At

I am trying to delete the commits from the gitorious server. Gitorious showing me some duplicate commits . How I can delete the commits from gitorious ?

Thanks

1

There are 1 best solutions below

0
Mudassir Razvi On

Do a git rebase -i HEAD~n, where n is the number of commits in history you want to modify.

It lists all your commits in your favorite editor, where each line is a commit. Delete the duplicate commit lines(if any), save and continue.

Do a git push -f <remote> <branch>

-f: force push (replace on server with what I am pushing, even if its fast-forward)

<remote>: your gitorious repository

<branch>: the branch you want to push. Don't give this option if you want to push all to all tracking branches

Hope this solves your problem!

Happy gitting!