I learned how to add a repository via the command line with curl and how to add a description for a commit with git commit, but how to add a repository description via the command line?
As noted in this answer, a repo description as seen on the GitHub website is specific to GitHub only.
So .git/description
would not work (only gitweb
is using it)
Using the GitHub API would, but you need to integrate the verb PATH
with your curl command in order to edit your repo.
curl -H "Authorization: token OAUTH-TOKEN" \
--request PATCH \
--data '{"name":"repo", "description":"a new description"}' \
https://api.github.com/repos/:owner/:repo
Make sure your are in your project's root, where you can locate .git
directory, you should do the following steps:
Modify the description file:
vi .git/description
Delete the existing text (press I
to switch to edit/insert mode ):
Unnamed repository; edit this file 'description' to name the repository.
Replace the default text with your project's description
My Awesome Project
To save the file and close vi editor. press Esc -> X -> Enter
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With