Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Delete history before given commit, from local and remote repository

mfederowicz January 20, 2015

Hi I have large repository with bunch of old commits for example:

A---B---...---L---M---N---O---P---Q
                       \     /
                        X---Y
I want to purge all commits before M. Is this posssible for local and remote repository, 
and How?

Thanks for proposals.

1 answer

0 votes
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 20, 2015

If you create a shallow clone that starts at M and push this to another repo or force push it to the original one, that should do the job. Make sure you have a backup of all the branches before you start.

mfederowicz January 20, 2015

I think I'll try shallow clone and then push to another repo and then replace repos if everything wil be ok smile

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events