# 1.新增数据 L@DESKTOP-T2AI2SU MINGW64 /j/git-repository/learngit (master) $ echo "readme.txt file v4" >> readme.txt # 2.查看readme.txt文件内容 L@DESKTOP-T2AI2SU MINGW64 /j/git-repository/learngit (master) $ cat readme.txt readme.txt file v1 readme.txt file v2 readme.txt file v3 readme.txt file v4 # 3.提交到本地版本库 L@DESKTOP-T2AI2SU MINGW64 /j/git-repository/learngit (master) $ git commit -a -m '第4次提交,新增内容:readme.txt file v4' warning: LF will be replaced by CRLF in readme.txt. The file will have its original line endings in your working directory [master e72b30f] 第4次提交,新增内容:readme.txt file v4 1 file changed, 1 insertion(+) # 4.现在查看此时本地版本库日志 L@DESKTOP-T2AI2SU MINGW64 /j/git-repository/learngit (master) $ git log --oneline e72b30f (HEAD -> master) 第4次提交,新增内容:readme.txt file v4 529ad74 第3次提交,新增内容:readme.txt file v3 1b23cae 第2次提交,新增内容:readme.txt file v2 2612adf 第1次提交,创建readme.txt文件
原链接https://www.cnblogs.com/liuyuelinfighting/p/16453957.html
技术交流欢迎加群
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/271808.html