Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github URL to create new file with specific name?

Tags:

github

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.

like image 505
Pithikos Avatar asked Dec 20 '22 08:12

Pithikos


1 Answers

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

like image 79
Pithikos Avatar answered Jan 08 '23 20:01

Pithikos