====== Git ======

  * [[https://inst.manuscript.com/f/page?W1152|Vast Wiki Git Page]]
  * git clone https://inst.kilnhg.com/Code/vastbuild/Testing/stable.git stable
  * So after pulling the new copy Test, delete the common folder completely. The idea here is to eliminate common from yoiur project then add back good copy of it.
  * Performing a "git status" should show that you are deleting common.  
  * Execute a "git add common” to register the deletion of common.
  * Now do the steps for adding common to a new project:
  * git submodule add https://inst.kilnhg.com/Code/vastbuild/Common/stable.git  
  * Then initialize and update the common subproject:
  * "git submodule init”
  * “git submodule update”
  * Now add the valid common subproject back into your project: "git add common”
  * Commit your Test project: “git commit”
  * Push the good copy back up into kiln “git push”
  * Must do a git pull from common to get latest version if common has changed. git pull from stable will not update common.
  * Failure to get to kiln can mean ssl certs out of date especially on solaris or aix

  * git status
  * git commit -am "some message"
  * git push 
  * may have to do "git -rm --cached common" if message is "already exists in index" after full clone
 
  * Store userid and pw: Just before performing a repository access action like git pull, enter the following command: **git config credential.helper store**

====== Find Big Objects ======

<code>
git rev-list --objects --all \
| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
| sed -n 's/^blob //p' \
| sort --numeric-sort --key=2 \
| cut -c 1-12,41- \
| $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
</code>
====== Remove Big Objects ======


  * download bfg.jar
  * clone your repo with the --mirror parameter
  * git clone --mirror  https://inst.kilnhg.com/Code/vastbuild/Testing/stable.git stable
  * run java -jar ./bfg-1.13.0.jar --strip-blobs-bigger-than 3M /home/donald/stable
  * run git reflog expire --expire=now --all && git gc --prune=now --aggressive
  * cd to stable.git (the mirror) and run git push



