相关疑难解决方法(0)

你如何git添加一个新的文件而不进行分期?

为了有效地使用git(并且按照预期),我进行了小型的原子提交,而我确实有更长的会话,我不仅要改变一件事.因此,我大量使用git add -p.但是,这对于全新的文件不起作用,因为我以后往往会忘记它们.

我想要做的是,告诉git一个新的文件,我想它来跟踪,但不是阶段,它:

示例:运行git status生成:

# On branch my-current-branch
# Your branch is ahead of 'origin/my-current-branch' by 2 commits.
#
# Changes to be committed:
#
<<STAGED SECTION>> // A
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
<<UNSTAGED-YET-KNOWN SECTION>> // B
#
# Untracked files: …
Run Code Online (Sandbox Code Playgroud)

git staging git-index

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

git commit自动添加新文件夹或文件?

是否可以git commit添加新文件和目录?

这似乎是一个很大的长远不用打字的有键入git add .然后git commit

(那,我倾向于经常忘记调用git add .导致版本缺少目录等)

git

9
推荐指数
1
解决办法
4980
查看次数

标签 统计

git ×2

git-index ×1

staging ×1