演示Git使用

Posted metianzing

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了演示Git使用相关的知识,希望对你有一定的参考价值。

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

 

[email protected] MINGW64 ~/Desktop/555
$ ls
Readme.md  run.py

[email protected] MINGW64 ~/Desktop/555
$ git init
Initialized empty Git repository in C:/Users/13643/Desktop/555/.git/

[email protected] MINGW64 ~/Desktop/555 (master)
$ git remote add origin https://github.com/shiyi000/test_forgit.git

[email protected] 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)

[email protected] MINGW64 ~/Desktop/555 (master)
$ git add .

[email protected] 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

[email protected] MINGW64 ~/Desktop/555 (master)
$ git status
On branch master
nothing to commit, working tree clean

[email protected] 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‘.

[email protected] MINGW64 ~/Desktop/555 (master)

  

提交成功会显示下图:

技术分享图片

 

以上是关于演示Git使用的主要内容,如果未能解决你的问题,请参考以下文章

sql 这些代码片段将演示如何逐步使用PolyBase。你应该有一个blob存储和存储秘密方便

VSCode自定义代码片段——git命令操作一个完整流程

VSCode自定义代码片段15——git命令操作一个完整流程

VSCode自定义代码片段15——git命令操作一个完整流程

如何使用 Android 片段?

如何管理在每个 git 版本中添加私有代码片段?