➜ hackers git:(master) git statusOn branch masterNo commits yetnothing to commit (create/copy files anduse "git add" to track) 1)output 1: On branch master 对于刚刚创建空仓库来说,master 是我们的默认分支,一个 Git 仓库下可以有很多分支 (branches),具体某一个分支的命名可以完全由你自己决定...
$ git status On branch master No commits yet Changes to be committed: (use "git rm --cached <file>..." to unstage) new file: hello.txt Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes ...
这一步,我们执行了提交,并且在执行命令git commit 的时候指定了标志-am.标志-a 让Git 将仓库中所有修改了的文件都加入当前提交中,(如果我们两次提交之间加入了新文件,我们执行get add . 操作,将新文件加入到仓库中)标志-m让Git咱提交历史中记录一条消息。 $ git commit -am "Extrended greeting." [master ...
如果是目录,表示该目录下所有文件都被追踪#检查文件状态#git statusOn branch master No commits yet Changes to be committed: (use"git rm --cached <file>..."to unstage) new file: first.txt 结果显示:"Changes to be committed"部分信息显示,就表明是 first.txt 文件已纳入到版本控制的已暂存区了,...
4. 再次确认上游分支:运行`git branch -vv`命令,确认是否已经成功设置了上游分支。你会看到当前分支的列表,上游分支将以`[远程仓库名/远程分支名]`的格式显示。 5. 提交代码:现在你可以使用`git commit`命令提交代码了。当你执行`git push`命令时,Git会自动将代码推送到正确的上游分支。
On branch master No commits yet nothing to commit (create/copy files and use "git add" to track) 从输出结果中,我们可以得到两条信息: On branch master - 这部分告诉我们 Git 位于 master 分支上。关于"master"分支(也就是默认分支)。我们将会在后续的分支文章中介绍。
On branch <branch>:显示当前所在的分支,上图表明所在分支为main。由于我们目前还没有提交任何文件,所以显示No commits yet。 Changes not staged for commit:列出已修改但未暂存的文件。 Changes to be committed:列出已暂存但尚未提交的文件。 Untracked files:列出未被 Git 管理的文件。
On branch master No commits yet Changes to be committed: (use "git rm --cached <file>..." to unstage) new file: testgit.txt 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 提交至版本库:git commit -m “注释内容”。 注:“注释可以使用中文” ...
On branch main No commits yet nothing to commit (create/copy files and use "git add" to track) 使用ls 命令以显示工作树的内容: Bash 复制 ls -a 确认目录包含一个名为“.git”的子目录。 (将 -a 选项与 ls 结合使用非常重要,因为 Linux 通常会隐藏以句点开头的文件和目录名称。)此文件夹为...
On branch main No commits yet Untracked files: (use "git add <file>..." to include in what will be committed) deploy/ nothing added to commit but untracked files present (use "git add" to track) 此文本告知以下四条信息: 你当前在主分支中。 稍后,你将了解有关分支的信息。