繁体   English   中英

如何使用文本编辑器编辑〜/ .git / config文件?

[英]how do I edit a ~/.git/config file using a text editor?

我正在通过bitbucket教程为git设置SSH。 在下面的图片中,我坚持在步骤7.2为git用户:“使用您喜欢的编辑器编辑〜/ repos / bb101repo-pratice / .git / config文件。”

问题是我不知道如何访问该文件并在编辑器中打开它。 我试过在我的终端输入“cd~ / repos / bb101repo-pratice / .git / config”,但是终端说该文件不存在。 我也尝试过使用spotlite和finder,但无济于事。

我如何访问该文件,然后一旦我这样做,我如何使用编辑器编辑它?

我最喜欢的编辑器是崇高的文字3,我在mackbook上运行mackericks。

您甚至不必手动编辑它。

只需输入(使用git remote命令):

git remote set-url origin git@bitbucket.org:newuserme/bb101repo.git

然后,您可以根据需要捕获文件以检查其内容:

cat <your home directory>/repos/bb101repo-pratice/.git/config

编辑:

git config --local --edit

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM