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$ 
    

      

  • 相关阅读:
    win10打开相机提示我们找不到你的相机
    Potplay视频播放画面扭曲
    SIFT特征匹配算法介绍
    SelectiveSearchCodeIJCV遇到First two input arguments should have the same 2D dimension
    mybatis逆向工程mvn插件
    ssm配置
    springmvc配置
    MyBatis如何禁用掉一级缓存
    Mybatis中#{}和${}的区别
    Java demo之IO
  • 原文地址:https://www.cnblogs.com/alfredsun/p/4472398.html
Copyright © 2011-2022 走看看