Gelonida venit, vidit, dixit 03.05.2010 11:33: > Hi, > > > > I posted already a similiar question about how to squash the all the commit > hostory older than a certain commit into one commit. > > > This question is slightly different. > > > I'm having a git repository. > > Suddenly I noticed, that git pull became rather slow. > > The reason: > One of the team members accidentally commited a very huge file together with > some useful sources. > a few commits later he noticed his error and removed the huge file. > > > > The plan would be: > - create a new git repository without the huge file > - let everybody clone the new repository and continue working. > > > I thought, that I could squash the commit adding the file, removing the file and > the commits in between into one commit. You don't need to squash the commits in between. Use git rebase -i A^ if A is the commit introducing the large file. Then, either edit that first commit (to not add the file) or reorder so that the removal commit is squashed into A. If everything looks fine people can pull and rebase. Note that in the source repository, there will still be a large "blob" until you prune and repack. Michael -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html