需要把之前一同事,某一段時間提交到 Git 倉庫的代碼找出來,查 Git 官網文檔,有了以下解決方案,記錄一下。如有更好的解決方案,請不吝指教。
指定提交人
git log --author='zhangsan'
指定時間段
git log --before='2019-4-23' --after='2019-3-31'
只列出文件名稱
git log --name-only
獲取指定作者某一時間段內,提交記錄的文件信息
組合上面三個參數即可
git log --author='zhangsan' --before='2019-4-23' --after='2019-3-31' --name-only