相关疑难解决方法(0)

Git commit -a"未跟踪文件"?

当我这样做时git commit -a,我看到以下内容:

  # Please enter the commit message for your changes. Lines starting
  # with '#' will be ignored, and an empty message aborts the commit.
  # On branch better_tag_show
  # Changes to be committed:
  #   (use "git reset HEAD <file>..." to unstage)
  #
  # modified:   ../assets/stylesheets/application.css
  # modified:   ../views/pages/home.html.erb
  # modified:   ../views/tags/show.html.erb
  # modified:   ../../db/seeds.rb
  #
  # Untracked files:
  #   (use "git add <file>..." to include in what will be committed)
  #
  # ../assets/stylesheets/
  # ../views/pages/ …
Run Code Online (Sandbox Code Playgroud)

git

79
推荐指数
6
解决办法
17万
查看次数

不分阶段进行Git提交

我注意到git允许直接提交跟踪文件(已在本地修改),而无需使用暂存,例如:

$ git status -s .
 M   myfile.txt
$ git commit myfile.txt -m"1 way"
Run Code Online (Sandbox Code Playgroud)

改为使用“经典”两个步骤更好吗?:

$ git add myfile.txt
$ git commit myfile.txt -m"2 way"
Run Code Online (Sandbox Code Playgroud)

git git-commit

1
推荐指数
2
解决办法
8921
查看次数

标签 统计

git ×2

git-commit ×1