[Qgis-developer] GIT Cleanup Completed

Charlie Sharpsteen chuck at sharpsteen.net
Mon Jun 6 16:23:37 EDT 2011


On Mon, Jun 6, 2011 at 6:46 AM, Tim Sutton <lists at linfiniti.com> wrote:

> Hi All
>
> Ok I have finished the cleanup of tags and branches in the GitHub main
> repository for QGIS. If you have a clone, you may want to perform a
> similar cleanup to your local repo. I strongly suggest making a backup
> before doing this and checking that the script below does not trash
> any of your valuable work. That said if you want a hint about how to
> remove the pruned branches and tags from your github or other clone
> you can use a variation of this bash script:
>

If you shoot yourself in the foot with git (i.e. deleting a branch or
resetting a commit), git still has the "deleted" content. Content that has
been committed but then disconnected from a branch isn't destroyed unless an
aggressive garbage collection takes place or it is really, really old (like
a month or more).  You can use tools like `git reflog` and `git fsck` to
find the SHAs of "lost" content and then unshoot yourself in the foot using
`git checkout`, `git cherry-pick`, `git branch`, etc.

Of course, mounting a scratch monkey by copying the repo is more efficient
in terms of time than digging around in the reflog.  But in case you ever
find yourself with a toe missing...


-Charlie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20110606/a1e01e9d/attachment.html


More information about the Qgis-developer mailing list