Git Clients

Delete File from Git Repo

Accidentally pushed big binary blobs, passwords or other sensitive data into a git repo?

This can be solved the hard way by using filter-branch1 or by using the tool BFG Repo-Cleaner.

$ java -jar /e/xampp/tools/bfg.jar --delete-folders @docs
$ bfg --delete-files

Remote Repo

Clone repo to remote

$ git clone --bare /e/WEB/

Push everything into remote

$ cd  /e/WEB/
$ git push origin --all
$ git push origin --tags

Pull shallow copy to empty folder

$ cd  /e/WEB/
$ git log --format=oneline --since="2014-02-12T16:36:00-07:00" | wc -l
$ git log --format=oneline --since="3 years ago" | wc -l
$ git clone --depth 10 /f/REPOSITORY/

Find --depth by time

Reduce Repo Size

Move .git folder to existant folder

$ git clone /f/REPOSITORY/ temp
$ mv temp/.git code/.git
$ rm -rf temp