zoukankan      html  css  js  c++  java
  • 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$ 
    

      

  • 相关阅读:
    codeforce1029B B. Creating the Contest(简单dp,简单版单调栈)
    spfa算法
    spfa算法
    HDU King (非连通图的差分约束,经典好题)
    HDU King (非连通图的差分约束,经典好题)
    差分约束系统相关证明(存在负环则无解证明)
    Java API 读取HDFS的单文件
    採用邻接矩阵创建图
    旧金山攻略
    一个jeecg整合activiti的学习样例,源代码下载
  • 原文地址:https://www.cnblogs.com/alfredsun/p/4472398.html
Copyright © 2011-2022 走看看