演示Git使用
2024-10-07 12:49:46
对于新建的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)
提交成功会显示下图:
最新文章
- 修改eclipse皮肤
- JavaScript随笔4
- Spark Streaming中动态Batch Size实现初探
- 与子域名共用session信息
- MVC神韵---你想在哪解脱!(十七)
- Sharepoint 2010 用VS定制Master,并且每个Web应用同一个Master
- select自动选中
- 【LeetCode】23. Merge k Sorted Lists
- 0_Simple__cudaOpenMP
- Python多线程案例
- Python内置函数(4)——ascii
- html 使表格随着内容自动适应宽度
- Binder吐槽学习
- mysql数据库优化之 如何选择合适的列建立索引
- c++ string替换指定字符串
- box-shadow阴影 三面显示
- jq文件上传及下载
- django基础 -- 1. 前奏 web框架的本质
- ButterKnife RadioGroup选择事件
- msf提权基础(一)