Github URL创建具有特定名称的新文件? [英] Github URL to create new file with specific name?

查看:104
本文介绍了Github URL创建具有特定名称的新文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道您可以使用网址 github.com/<username> /< project_name> / new /< branch_name> /< path_to_create_file> 创建一个项目的给定路径中的新文件。

有没有办法做到这一点,但从URL指定新文件的名称?



因此,在浏览器中点击下面的内容:

  http:// github .com / Pithikos / C-Thread-Pool / new / master / tests / newtest.py 

让我到Github的在线编辑器,我就可以开始输入 newtest.py

解决方案

c>在URL中。你甚至可以添加一些内容到新文件。例如,要创建一个名为 newtest.py 且默认值为将代码放在这里的新文件,请使用以下URL :



https://github.com/Pithikos/C-Thread-Pool/new/master/tests?filename=newfile.py&value=PUT%20YOUR% 20CODE%20HERE

I know you can use the URL github.com/<username>/<project_name>/new/<branch_name>/<path_to_create_file> to create a new file at a given path of a project.

Is there a way to do the same but from the URL specify the name of the new file?

So hitting something like the below in the browser:

http://github.com/Pithikos/C-Thread-Pool/new/master/tests/newtest.py

Would get me to Github's online editor and I would be able to start typing for newtest.py.

解决方案

Answer: Yes.

You can set the parameter filename in the URL. You can even add some content to the new file. For instance, to create a new file called newtest.py with default value PUT YOUR CODE HERE, use the following URL:

https://github.com/Pithikos/C-Thread-Pool/new/master/tests?filename=newfile.py&value=PUT%20YOUR%20CODE%20HERE

这篇关于Github URL创建具有特定名称的新文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆