问题描述
请参阅完全:
我现在使用rsync来处理来自
- 〜/ bin /
- 〜/(只有一些点文件)
丹尼尔的陈述表明我可能会有更好的
我不确定他的意思是什么
看起来他没有说话关于git-add。
如何将文件添加到回购库中,而不是使用git-add?
我相信Daniel所指的是使用Git来管理特定目录中的文件,而不是复制它们。例如,在没有任何Git仓库的情况下,您可能会:
cd〜/ bin
git init
git add。
现在,您的〜/ bin
目录包含一个〜/ bin / .git
存储库,您可以 git add
和 git diff
直接从
〜/ bin
目录下。
Please, see Greg's answer.
I do not understand Daniel's statement at the thread completely:
I am at the moment using rsync in coping files from
- ~/bin/
- ~/ (only some dot-files)
Daniel's statement suggests me that there may be a better way to do the workflow locally.
I am not sure what he means by
It seems that he is not speaking about git-add.
How can you add files to your repo, not with git-add?
I believe what Daniel was referring to is using Git to manage the files in particular directories in place, without copying them around. For example, starting without any Git repository, you might:
cd ~/bin
git init
git add .
Now, your ~/bin
directory contains a ~/bin/.git
repository and you can git add
and git diff
right from the ~/bin
directory.
这篇关于无法在本地有效地使用Git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!