9.删除文件 [实践出真知] 创建test.txt 文件 并add 和commit到仓库 $ git status #新增加的文件test.txt On branch master Untracked files: (use "git add <file>..." to include in what will be committed) test.txt nothing added to commit but untracked files present (use &
我们已经成功地添加并提交了一个readme.txt文件,现在,是时候继续工作了,于是,我们继续修改readme.txt文件,改成如下内容: Git is a distributed version control system. Git is free software. 现在,运行git status命令看看结果: $ git status On branch master Changes not staged for commit: (use "git add <file>...
git status命令表示:文件,文件夹在工作区,暂存区的状态,下图就是文件,文件夹三种状态: Changes to be committed: (use "git restore --staged <file>..." to unstage) new file: bbbb.txt Changes not staged for commit: (use "git add <file>..." to update what will be c
查看当前文件状态 使用git status查看文件状态,如果是空仓库,执行结果如下 $ git status On branch master No commits yet nothing to commit (create/copy files and use "git add" to track) 如果我们加入一个新文件main.c $ git status On branch master No commits yet Untracked files: (use "gi
git status命令可以列出当前目录所有还没有被git管理的文件和被git管理且被修改但还未提交(git commit)的文件.. 比如; git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: 2.txt # # Changes not staged for commit:
本篇博客是整理git相关知识的第一篇,因为之前一直是用SourceTree对Git的命令行操作用的不是特别熟,于是乎过了一遍ProGit(链接:https://git-scm.com/book/zh/v1).本篇博客以及后边的将要发的几篇博客是对之前看ProGit时的笔记的整理.当然在整理时,根据具体示例来梳理了一下知识点,和ProGit上的讲解顺序有些区别.本篇博客聊了Git基础操作的一部分,主要是基于Github上Fork的Masonry仓库来做的,首先Clone相关仓库,然后根据git s