├── README.md ├── gitfool └── gitfool.png /README.md: -------------------------------------------------------------------------------- 1 | # Gitfool 2 | 3 | Gitfool (or Gitfull) is a shell command for you to fulfill your git commit log. 4 | 5 | This is the easiest way to make you a [Rockstar](https://github.com/avinassh/rockstar) Programmer ! 😅 6 | 7 | **Update** 8 | 9 | For your convenience, you can be gitfooled just exceute this command in you repository directory: 10 | 11 | ```bash 12 | curl -s https://raw.githubusercontent.com/Jaggle/Gitfool/master/gitfool| sh -s `pwd` 365 --push 13 | ``` 14 | 15 | > Gitfool is a trick, take care of what you are doing. 16 | 17 | ![](gitfool.png) 18 | 19 | ## USAGE 20 | 21 | ```bash 22 | ./gitfool [repo_path] [days] --push 23 | ``` 24 | 25 | **repo_path** 26 | 27 | the repository path you want to add commits 28 | 29 | **days** 30 | 31 | the past days you wish to add these commits, for example : 365 means the past one year. 32 | 33 | **--push** 34 | 35 | with this option, Gitfool will push the commits to remote (execute `git push`) 36 | 37 | > don't use `sh gitfool` syntax, and it will report an error. 38 | 39 | ## EXAMPLE 40 | 41 | ```bash 42 | ./gitfool ~/Code/acme 365 --push 43 | ``` 44 | 45 | ## WARNING 46 | 47 | you may be reported for abusing if you push these commits to Github. 48 | -------------------------------------------------------------------------------- /gitfool: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | REPO_PATH=$1; 4 | DAYS=$2; 5 | PUSH=$3; 6 | 7 | if [ ! -d ${REPO_PATH} ];then 8 | echo ${REPO_PATH} 'is not a valid path' 9 | exit 10 | fi 11 | 12 | if [ -n "`echo ${DAYS} | sed 's/[0-9]//g'`" ];then 13 | echo ${DAYS} 'is not a valid number' 14 | exit 15 | fi 16 | 17 | cd ${REPO_PATH} 18 | git status > /dev/null 2>&1 19 | if [ $? -ne 0 ];then 20 | echo ${REPO_PATH} 'is not a valid repository' 21 | exit 22 | fi 23 | 24 | echo -e "\nGitfool is generating your commits, please wait...\n" 25 | 26 | for((i=0; i<=${DAYS}; i ++)) 27 | do 28 | COUNT=$(($RANDOM%15)) 29 | 30 | date -v -1d > /dev/null 2>&1 31 | 32 | if [ $? -ne 0 ];then 33 | THIS_DATE=`date -d "${i} days ago"` 34 | else 35 | THIS_DATE=`date -v-${i}d -R` 36 | fi 37 | 38 | for((c=0; c<=${COUNT}; c ++)) 39 | do 40 | git commit --allow-empty -m "update at ${THIS_DATE}" --date="${THIS_DATE}" > /dev/null 2>&1 41 | done 42 | done 43 | 44 | if [ "${PUSH}" == "--push" ];then 45 | git push 46 | fi 47 | echo -e "\n\n finished your Gitfull !!!" 48 | -------------------------------------------------------------------------------- /gitfool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jjsty1e/Gitfool/a6cd424be3691c514102e900a5bea104af12e429/gitfool.png --------------------------------------------------------------------------------