Created
November 2, 2013 19:14
-
-
Save ksomemo/7282412 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REPO_DIR=git-pack-gc | |
LINE_NUM=100000 #000 | |
FILE_NAME=numbers.txt | |
GIT_OBJECTS_DIR='.git/objects' | |
echo "mkdir and git init" | |
mkdir ${REPO_DIR} | |
cd ${REPO_DIR} | |
git init | |
echo "" | |
echo "Create ${LINE_NUM} lines file." | |
seq 1 ${LINE_NUM} > ${FILE_NAME} | |
echo "working tree size." | |
ls -lh | |
echo "" | |
echo "find git objects." | |
find ${GIT_OBJECTS_DIR} | |
echo "" | |
echo "git add ." | |
git add . | |
echo "" | |
echo "find git objects after git add command." | |
find ${GIT_OBJECTS_DIR} | |
echo "" | |
echo ".git/objects size." | |
du -sh ${GIT_OBJECTS_DIR} | |
echo "" | |
echo "git commit" | |
git commit -m "Create ${LINE_NUM} lines file." | |
echo "" | |
echo "find git objects." | |
find ${GIT_OBJECTS_DIR} | |
echo "" | |
echo "add one line to ${FILE_NAME} and git add." | |
echo `expr ${LINE_NUM} + 1` >> ${FILE_NAME} | |
git add . | |
echo "" | |
echo "find git objects." | |
find ${GIT_OBJECTS_DIR} | |
echo "" | |
echo ".git/objects size." | |
du -sh ${GIT_OBJECTS_DIR} | |
echo "" | |
echo "git commit." | |
git commit -m "Add 1 line." | |
echo "" | |
echo "find git objects." | |
find ${GIT_OBJECTS_DIR} | |
echo "" | |
echo ".git/objects size." | |
du -sh ${GIT_OBJECTS_DIR} | |
echo "" | |
echo "git gc" | |
git gc | |
echo "" | |
echo ".git/objects size." | |
du -sh ${GIT_OBJECTS_DIR} | |
echo "" | |
echo "find git objects." | |
find ${GIT_OBJECTS_DIR} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment