他们俩之间有什么区别?我正在学习我的教程,他们给出了全局配置设置,但我不确定它们之间的区别是什么,以及我何时应该使用它们。git config --list和cat .gitconfig有什么区别?
0
A
回答
3
git config --list
会列出当前可见的所有配置(当前目录)
它会列出所有配置,系统宽在顶部,其次是全球配置(下最经常被发现~/.gitconfig
),然后是本地配置(如果在git存储库中)。
cat .gitconfig
将最有可能只在你的home目录的工作(~/
)
另外两个的格式会有所不同。
有关更多详细信息,请参阅git config的文档。
我不明白了一个道理,为什么不使用git config --list
始终。
0
.gitconfig
是git config --list
将搜索配置选项的四个配置文件之一。 .gitconfig
仅包含用户特定的配置(也称为全局配置),但您也可以具有系统特定的和特定于存储库的配置。要全面了解当前目录中的配置,应该使用git config --list
。请查看git config --help
的FILES
部分。
3
cat .gitconfig
向您显示文件.gitconfig的内容。如果这是git使用的(这是可配置的),那么它与相应的设置级别相同。
在Git中,您有三个级别的设置文件,在存储库中,全局为您的用户,全局为全部用户。 git config --list
将列出您所在地区的所有有效生效日期。
相关问题
- 1. `cat <file`和`cat file`有什么区别?
- 2. @ + id/android:list和@ + id/list有什么区别
- 3. 'index'和'list-index'有什么区别
- 4. git-stash和git-checkout有什么区别?
- 5. file .git和directory .git有什么区别?
- 6. GIT的Branch和Remote有什么区别?
- 7. git和bitbucket有什么区别?
- 8. git clone和checkout有什么区别?
- 9. git pull,git fetch和git rebase有什么区别?
- 10. IEnumerable和Array,IList和List之间有什么区别?
- 11. 有人可以告诉我List,Collection和Enumerable有什么区别?
- 12. 在maven中,main/resources和main/config有什么区别?
- 13. YANG中的Operational和Config有什么区别?
- 14. .NET中.resx和.config文件有什么区别?
- 15. 漂亮的eslint,eslint-plugin-prettier和eslint-config-prettier有什么区别?
- 16. 别名和标签有什么区别? (一般和在git中)
- 17. 'git format-patch和'git diff'有什么区别?
- 18. git commit -am和git之间有什么区别-m
- 19. “git checkout -f”和“git reset --hard HEAD”有什么区别?
- 20. “git add”和“git update-index”有什么区别
- 21. git clone和git clone --mirror有什么区别?
- 22. “git reset --hard”和“git checkout。”有什么区别?
- 23. `git add .`和`git add -u`有什么区别?
- 24. git add有什么区别?和git add -A?
- 25. git cherry-pick和git show之间有什么区别? patch -p1?
- 26. `git reset HEAD`和`git reset HEAD〜'之间有什么区别吗?
- 27. PageList,ValueList和Code-Pega-List之间有什么区别?
- 28. Python中的List,Dictionary和Tuple有什么区别?
- 29. Java中的Collection和List有什么区别?
- 30. 在Lisp(Clojure,Emacs Lisp)中,list和quote有什么区别?