Git初试

IDEA拉远仓代码指定分支命令:
git branch --set-upstream-to=RemoteNotifyService/master master

 

按某个时间段查找提交代码量:(要指定某一个人,就将里面额的name换成特定的用户名)
git log --format='%aN' | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --pretty=tformat: --since ==2020–09-01 --until=2020-09-30 --numstat | awk '{ add += $1; subs += $2; loc += $1- $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done

 

提高git clone项目的速度:
使用github的镜像网站进行访问,github.com.cnpmjs.org,我们将原本的网站中的github.com 进行替换。
例:git clone https://github.com/lenve/vhr.git 替换为 git clone https://github.com.cnpmjs.org/lenve/vhr.git

 

posted @ 2020-09-21 17:34  zhourup  阅读(50)  评论(0)    收藏  举报