git add . 是啥意思
我想大声告诉你
我想大声告诉你 2017-05-02 09:20:11
0
5
1088

用git 做代码托管有一段时间了。因为我喜欢我用命令行,不喜欢用可视化工具。
我一直不明白 git add . 是啥意思?
我的操作流程是这样的:
1.项目中新加了文件a.js。
2.然后我执行git add .
3.git status 后出现:
(use "git reset HEAD ..." to unstage)
new file a.js

  1. 我执行git reset HEAD 后,在git status还是有这个! 貌似无法加进去。

对于新加的文件。你们是用git add * 还是git add .

求指导!谢谢!

我想大声告诉你
我想大声告诉你

reply all(5)
伊谢尔伦

git add .添加当前工作目录文件到index
git commit -m "some comments"生成一个commit
git pushPush Server

小葫芦

git reset HEAD执行成功的话应该会把当期目录下的状态都还原。你执行git reset HEADDid you fail? Are there any error messages?
For newly added files, I am still used to itgit add . -- ‘*’得按着shift, so tired

我想大声告诉你

I use git add *
git add * git会自动把你当前目录所有修改过的文件添加
git add . Git will recursively add all the files in the directory where you execute the command, so if you pass the current working directory as a parameter, it will track all the files there

小葫芦

Usually just add all modified files

黄舟

If you want to synchronize all changes, try it git add -A

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!