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$ 
    

      

  • 相关阅读:
    XmLHttpRequst下载Excel
    mysq for visual studio 1.1.1
    滚动条样式设置
    正则
    比较偏门的JVM语言Quercus
    OMG 在线思维导图都有开源的
    从几篇文字得到关于web app开发的性能问题的答案
    用linux遇到的一个死循环
    有道笔记
    FreeBSD 10 发布
  • 原文地址:https://www.cnblogs.com/alfredsun/p/4472398.html
Copyright © 2011-2022 走看看