zoukankan      html  css  js  c++  java
  • 演示Git使用

    对于新建的repository,第一次提交,完整过程:

    13643@DESKTOP-K6CS6SE MINGW64 ~/Desktop/555
    $ ls
    Readme.md  run.py
    
    13643@DESKTOP-K6CS6SE MINGW64 ~/Desktop/555
    $ git init
    Initialized empty Git repository in C:/Users/13643/Desktop/555/.git/
    
    13643@DESKTOP-K6CS6SE MINGW64 ~/Desktop/555 (master)
    $ git remote add origin https://github.com/shiyi000/test_forgit.git
    
    13643@DESKTOP-K6CS6SE MINGW64 ~/Desktop/555 (master)
    $ git status
    On branch master
    
    No commits yet
    
    Untracked files:
      (use "git add <file>..." to include in what will be committed)
    
            Readme.md
            run.py
    
    nothing added to commit but untracked files present (use "git add" to track)
    
    13643@DESKTOP-K6CS6SE MINGW64 ~/Desktop/555 (master)
    $ git add .
    
    13643@DESKTOP-K6CS6SE MINGW64 ~/Desktop/555 (master)
    $ git commit -m 'first commit'
    [master (root-commit) b0e1438] first commit
     2 files changed, 5 insertions(+)
     create mode 100644 Readme.md
     create mode 100644 run.py
    
    13643@DESKTOP-K6CS6SE MINGW64 ~/Desktop/555 (master)
    $ git status
    On branch master
    nothing to commit, working tree clean
    
    13643@DESKTOP-K6CS6SE MINGW64 ~/Desktop/555 (master)
    $ git push -u origin master
    Counting objects: 4, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (4/4), 413 bytes | 413.00 KiB/s, done.
    Total 4 (delta 0), reused 0 (delta 0)
    To https://github.com/shiyi000/test_forgit.git
     * [new branch]      master -> master
    Branch 'master' set up to track remote branch 'master' from 'origin'.
    
    13643@DESKTOP-K6CS6SE MINGW64 ~/Desktop/555 (master)
    

      

    提交成功会显示下图:

  • 相关阅读:
    C# 文件类的操作---删除
    C#实现Zip压缩解压实例
    UVALIVE 2431 Binary Stirling Numbers
    UVA 10570 meeting with aliens
    UVA 306 Cipher
    UVA 10994 Simple Addition
    UVA 696 How Many Knights
    UVA 10205 Stack 'em Up
    UVA 11125 Arrange Some Marbles
    UVA 10912 Simple Minded Hashing
  • 原文地址:https://www.cnblogs.com/metianzing/p/9263881.html
Copyright © 2011-2022 走看看