
git
pl在之心
立足当下
展开
-
git如何统计代码提交行数
1. 问题 如何查看每个人的代码提交行数 2. 实现 2.1 查看git上个人代码量 // 修改username git log --author="username" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s...原创 2020-03-13 11:26:04 · 4913 阅读 · 0 评论 -
gitlab上先创建项目并存在文件,本地代码如何提交到该仓库
1. 本地git init git init 2. 本地关联上远程 $ git remote add origin https://github.com/user/repo.git 3. 从远程拉取最新代码 git pull origin master 4. 本地add git add . 5. 本地commit git commit -m 'init'...原创 2020-02-25 09:35:34 · 2044 阅读 · 0 评论