• git学习笔记


    //2015年5月2日19:40:02

    alf@alf-virtual-machine:~/Git/repository$ vim readme.txt
    alf@alf-virtual-machine:~/Git/repository$ git add readme.txt
    alf@alf-virtual-machine:~/Git/repository$ clear
    
    alf@alf-virtual-machine:~/Git/repository$ ls
    readme.txt
    alf@alf-virtual-machine:~/Git/repository$ git commit -m "wrote readme file"
    [master (根提交) b180eca] wrote readme file
     1 file changed, 2 insertions(+)
     create mode 100644 readme.txt
    alf@alf-virtual-machine:~/Git/repository$ git commit -m "Black Test"
    位于分支 master
    无文件要提交,干净的工作区
    alf@alf-virtual-machine:~/Git/repository$ vim readme.txt 
    alf@alf-virtual-machine:~/Git/repository$ git status
    位于分支 master
    尚未暂存以备提交的变更:
      (使用 "git add <file>..." 更新要提交的内容)
      (使用 "git checkout -- <file>..." 丢弃工作区的改动)
    
    	修改:         readme.txt
    
    修改尚未加入提交(使用 "git add" 和/或 "git commit -a")
    alf@alf-virtual-machine:~/Git/repository$ git diff
    diff --git a/readme.txt b/readme.txt
    index 46d49bf..9247db6 100644
    --- a/readme.txt
    +++ b/readme.txt
    @@ -1,2 +1,2 @@
    -Git is a version control system.
    +Git is a distributed version control system.
     Git is free software.
    alf@alf-virtual-machine:~/Git/repository$ git add readme.txt 
    alf@alf-virtual-machine:~/Git/repository$ git status
    位于分支 master
    要提交的变更:
      (使用 "git reset HEAD <file>..." 撤出暂存区)
    
    	修改:         readme.txt
    
    alf@alf-virtual-machine:~/Git/repository$ git commit -m"change readme.txt"
    [master 6534065] change readme.txt
     1 file changed, 1 insertion(+), 1 deletion(-)
    alf@alf-virtual-machine:~/Git/repository$ git status
    位于分支 master
    无文件要提交,干净的工作区
    alf@alf-virtual-machine:~/Git/repository$ 
    

      

  • 相关阅读:
    grafana+mysql忘记admin密码解决方法
    grafana 的配置文件,和使用mysql数据库做持久化
    贴两个mysql优化的配置文件
    Zabbix监控win10系统
    zabbix监控mysql
    http状态码-备查
    安卓移动端line-height垂直居中出现偏移的解决方法
    Video 自动播放
    渐进式Web应用(PWA)
    基于svg的环形进度条
  • 原文地址:https://www.cnblogs.com/alfredsun/p/4472398.html
Copyright © 2020-2023  润新知