大数据全系列 教程
1869个小节阅读:467.9k
目录
408考研
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
x# 首次查看,工作区中没有任何文件
$ git status
On branch master # 当前在master分支
No commits yet # 目前还没有提交过
nothing to commit (create/copy files and use "git add" to track)#没有需要提交
# 新增文件
$ vim gtjin.txt
hello git,hello gtjin
hello git,hello gtjin
hello git,hello gtjin
# 查看所有的未被隐藏的文件
$ ll
total 1
-rw-r--r-- 1 Administrator 197121 66 Sep 17 17:57 gtjin.txt
#查看文件中的内容
$ cat gtjin.txt
hello git,hello gtjin
hello git,hello gtjin
hello git,hello gtjin
# 再次查看状态
$ git status
On branch master
No commits yet # 目前还没有提交过
Untracked files:#未被追踪的文件
(use "git add <file>..." to include in what will be committed)
gtjin.txt
nothing added to commit but untracked files present (use "git add" to track)
$ git add gtjin.txt
warning: LF will be replaced by CRLF in gtjin.txt.
The file will have its original line endings in your working directory
Administrator@SC-201911261404 MINGW64 /d/GitSpace/FirstGitRepos (master)
$ git status
On branch master
No commits yet
Changes to be committed: # 可以通过如下命令删除 git add 添加的文件
(use "git rm --cached <file>..." to unstage)
new file: gtjin.txt
# 删除 git add 添加的文件
$ git rm --cached gtjin.txt
rm 'gtjin.txt'
# 再次查看状态,回到了git add执行之前的状态
$ git status
On branch master
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
gtjin.txt
nothing added to commit but untracked files present (use "git add" to track)
$ git add gtjin.txt
warning: LF will be replaced by CRLF in gtjin.txt.
The file will have its original line endings in your working directory
$ git status
On branch master453
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: gtjin.txt