在命令行上建新的存储库
// 编写一个文档
echo "# dsfdfdsf" >> README.md
// 初始化此目录为git相关的目录
git init
// 添加 readme.md 到git索引
git add README.md
// 将 README.md 提交到本地的版本库
git commit -m "first commit"
//
git branch -M master
// 把此目录添加远程仓库路径
git remote add origin https://github.com/gyh7790/dsfdfdsf.git
// 上传代码到git仓库
git push -u origin master
git remote add origin https://github.com/gyh7790/dsfdfdsf.git
git branch -M master
git push -u origin master
配置用户名和密码
git config --global user.name "guoyh"
git config --global user.email ""
// 或直接进项目的配置文件修改
查看代码行数
git log --author="guoyh" --since=2021-08-22 --until=2021-08-28 --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }'
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。