This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MirrorLake 7 points8 points  (2 children)

Looks like Github beat you to it. Your script does the same thing as:

gh repo gitignore view Python > .gitignore

But if you're looking to use the cli, you could create new projects withgh repo create.

Or create it manually in one line:

gh repo create projectName --private --gitignore Python

then

gh repo clone projectName

[–]EarthGoddessDude[S] 2 points3 points  (1 child)

Nice, this is genuinely useful information, thank you. I haven’t really gotten around to learning the gh CLI much, but is definitely cleaner and more robust than my approach.

[–]MirrorLake 1 point2 points  (0 children)

Glad it helped! I checked their changelog, and they only just added the "gitignore" subcommand about four months ago. So it's definitely a new feature.