[小白学习]git个人整理

一、git 查看提交文件清单

场景:

      部门这边上线流程在进行代码合同时,要求只合并本次修改的文件。所以需要研发自行记录每个人的文件修改记录。

解决方案:

     1. 进入git bash

     2. 执行 git log --author=作者名 --name-only --after="2018-04-02(此处为哪个时间点进行统计)" | grep 'minsu-service' | sort | uniq

       例如: git log --author=dongzhuo --name-only --after="2018-04-02" | grep '项目文件夹名(其实可以随便找一个关键字)' | sort | uniq


二、在非工作目录执行git pull操作

场景:写脚本自动更新然后部署,需要在非工作目录执行shell脚本

解决方法(centos):

GIT_DIR=/home/tom/deploy/src/spclouddemo/.git git pull

    

参考:

https://blog.csdn.net/ly890700/article/details/73224912

https://blog.csdn.net/runfan1014/article/details/54584448

猜你喜欢

转载自blog.csdn.net/c364902709/article/details/80191582