The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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 Champions.
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

TAGS
AUG Leaders

Atlassian Community Events