• 演示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)
    

      

    提交成功会显示下图:

  • 相关阅读:
    java后台打开浏览器代码
    java国际化
    Struts2之action 之 感叹号 ! 动态方法调用
    ssh框架总结之action接收参数的三种方式
    电脑开机过程
    4.18quaternion rotation
    4.2
    "hello,world"lena
    bash 简介
    SCHEDULE
  • 原文地址:https://www.cnblogs.com/metianzing/p/9263881.html
Copyright © 2020-2023  润新知