# Question about purge git history

1 messages from 2017-10-24 to 2017-10-24. Participants: Kai Zhang.
Thread: https://gitlist.dev/t/47012

## Kai Zhang, 2017-10-24 00:26

Subject: Question about purge git history
Message-ID: <5E33218C-F943-4400-9F78-399A1DD74738@netskope.com>
URL: https://gitlist.dev/e/5E33218C-F943-4400-9F78-399A1DD74738%40netskope.com

```
Hi

I have a git repository on server side, and a client keep pulling this repository periodically. After a while this repository gets very big (even after git gc), and since history is not very important to us, a purge strategy is needed.

I did some research on internet, and found two methods are available to purge history on git repository:

1. Remove .git folder
    1. Remove .git folder
    2. Reinit repository
    3. Commit all existing files
2.  Create a new branch and remove existing branch
    1. git checkout --orphan latest_branch
    2. git add -A
    3. git commit -am "commit message"
    4. git branch -D master
    5. git branch -m master
    6. git reflog expire --expire=now --all
    7. git gc --prune=now

Here I have two questions:
1. What would happen if client pulling is executed concurrently with above 2 methods? Would client side repository gets corrupted?
2. Is there anyway to propagate purged repository to client side?

Thank you so much for your attention.

Best Regards,
Kai
```
