小编Dar*_*der的帖子

GitHub Desktop - 如何更改默认存储目录?

我在 Windows 上使用 GitHub Desktop,并且想要更改克隆存储库默认所在的目录(当前%USER%\Documents\GitHub\)。

我在 8 年前就看过这个问题,其中 OP 使用 GitHub for Windows GUI,但这显然与 GitHub Desktop 不一样,因为没有一个答案对我有用。什么都不做,我在全局选项或存储库设置中Alt-T找不到默认存储目录。此外,GitHub Desktop 的快捷方式完全在不同的目录中启动,因此修改它是没有用的。

我知道我可以使用命令行访问git clone任何目录,但如果也可以配置桌面版本来执行此操作,那就太好了。

有谁知道如何更改在当前版本的 GitHub Desktop 中运行的克隆存储库的默认目录?

github github-desktop

4
推荐指数
1
解决办法
4697
查看次数

file.write() 还是打印到文件更好?

要写入名为“file.txt”的文件,我可以使用:

with open('file.txt', 'a') as file:
    file.write('some text')
Run Code Online (Sandbox Code Playgroud)

或者 :

with open('file.txt', 'a') as file:
    print('some text', file=file)
Run Code Online (Sandbox Code Playgroud)

各自的优点/缺点是什么?它们本质上是一样的吗?

python text-files python-3.x

3
推荐指数
1
解决办法
1952
查看次数

标签 统计

github ×1

github-desktop ×1

python ×1

python-3.x ×1

text-files ×1