no changes added to commit (use "git add" and/or "git commit -a") 可以看到,readme.txt被修改了(modified),而LICENSE还从来没有被添加过,所以它的状态是Untracked。现在,使用两次命令git add,把readme.txt和LICENSE都添加后,用git status再查看一下: $ git status On branch master Changes to be co...
$git commit--amend [master 671f5cc] commit--amend, add file3 files changed,2insertions(+),0deletions(-) create mode100644file2 create mode100644file3 $git status # On branch master nothing to commit (working directory clean) 当然如果最后一次commit的信息在想修改之前已经push上去了,那。。。 ...
On branch master Your branchisup to datewith'origin/master'.nothing to commit,working tree clean 原因: 版本分支的问题 解决方法: 新建一个分支 $ git branch newbranch 检查分支是否创建成功 $ git branch 会有如下提示(前面的*代表的是当前你所在的工作分支) 切换到你的新分支 $ git checkout newbranch...
yang@mint-linux ~/Documents/repo01 $git status# On branch master # Changes not stagedforcommit: # (use"git add <file>..."to update what will be committed) # (use"git checkout -- <file>..."to discard changesinworking directory) # # modified: test01 # modified: test02 # no chang...
$ git commit-m'第一次版本提交'[master(root-commit)d32cf1f]第一次版本提交2files changed,4insertions(+)create mode100644README create mode100644hello.php 现在我们已经记录了快照。如果我们再执行 git status: $ git status# On branch masternothing to commit(working directory clean) ...
On branch master Initial commit nothing to commit (create/copy files and use "git add" to track) 注意最后一行 – nothing to commit (create/copy files and use "git add" to track)。注意到它推荐使用的 git add 命令了吗?这很有帮助!git status 的输出结果将给出下一步应该怎么做的建议或提示。
On branch master意思是当前的分支是master,可以理解为当前的用户空间是master的。 No commits yet:还没有commit,意思是还没有提交一个备注,这个备注是必须的,每次更改必须有备注。 Untracked files:未追踪文件。 (use "git add <file>..." to include in what will be committed):使用 "git add <file>.....
On branch master Initial commit Untracked files: (use "git add ..." to include in what will becommitted) hello.txt git 告诉我们,hello.txt尚未跟踪,这是因为这个文件是新的,git不知道是应该跟踪它的变动呢,还是直接忽略不管呢。为了跟踪我们的新文件,我们需要暂存它。
因为刚才你创建了一个新分支,并切换过去进行了一些工作,随后又切换回 master 分支进行了另外一些工作。 上述两次改动针对的是不同分支:你可以在不同分支间不断地来回切换和工作,并在时机成熟时将它们合并起来。 而所有这些工作,你需要的命令只有branch、checkout和commit。
* master newbranch 1. 2. 然后切换到你的新分支 $ git checkout newbranch 1. 然后将你的改动提交到新分支上 $ git add . $ git commit -m "18.03.01" 1. 2. 然后git status检查是否成功 On branch newbranch nothing to commit, working directory clean ...