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

时间:2014-10-16 04:45:54

标签: git ssh

我正在通过bitbucket tutorial为git设置SSH。在下面的图片中,对于git用户,我陷入了第7.2步:“使用您喜欢的编辑器编辑〜/ repos / bb101repo-pratice / .git / config文件。”

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

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

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

1 个答案:

答案 0 :(得分:2)

您甚至不必手动编辑它。

只需输入(使用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