➜ 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 commit 的时候指定了标志-am.标志-a 让Git 将仓库中所有修改了的文件都加入当前提交中,(如果我们两次提交之间加入了新文件,我们执行get add . 操作,将新文件加入到仓库中)标志-m让Git咱提交历史中记录一条消息。 $ git commit -am "Extrended greeting." [master ...
进入我们创建的Git仓库,并输入git status时,我们能得到下图的输出结果: On branch master No commits yet nothing to commit (create/copy files and use "git add" to track) 从输出结果中,我们可以得到两条信息: On branch master - 这部分告诉我们 Git 位于 master 分支上。关于"master"分支(也就是默认分...
接下来,我们可以通过在demo_repo项目的根目录下继续执行git branch test来为其添加一个名为test的新分支,然后再次执行git branch命令查看一下分支的变化: $ git branchtest$ git branch * mastertest 从上述输出可以看到,现在项目中有了master和test两个分支,而我们当前位于master分支上。接下来,我们可以通过git che...
原来,Git要先commit一次之后才会真正建立master分支,此时才可以建立其它分支 D:\pythonWorkspace\main_code>git status On branch master No commits yet Changes to be committed: (use "git rm --cached <file>..." to unstage) new file: test.txt ...
// 第一步进入桌面Git原理文件夹$ cd/Users/wn/Desktop/Git原理// 初始化git$ git init// 添加提交test文件夹$ gitadd.$ git commit-m"add test dir"Onbranch masterInitialcommit nothing to commit 2.1 发现上面提交文件夹报了nothing to commit,这是为什么呢?
On branch b1 Changes not staged for commit: # 有修改操作还未追踪 (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: aaa.txt no changes added to commit (use "git add" and/or "git commit -...
On branch master No commits yet Untracked files: (use "git add <file>..." to include in what will be committed) .editorconfig . . . .Nfiles nothing added to commit but untracked files present (use "git add" to track) and in output console VSC: ...
On branch master You have unmerged paths. (fix conflictsandrun"git commit") Unmerged paths: (use"git add <file>..."to mark resolution) both modified: index.html no changes added to commit (use"git add"and/or"git commit -a")
命令:git checkout <branch_name> 行为:将 HEAD 指针指向目标分支,并切换工作目录内容。 示例:$ git checkout testing 这样HEAD就指向testing分支了。 编辑 那么,这样的实现方式会给我们带来什么好处呢? 现在不妨再提交一次: $vim test.rb$git commit -a -m'made a change' ...