Reputation: 1547
Suppose you have a remote repository on GitHub and you want to add a file to that repository... Can that be done at the Git command line, without pulling all the files from that repository?
Upvotes: 2
Views: 450
Reputation: 66204
Suppose you have a remote repository on GitHub and you want to add a file to that repository... Can that be done at the Git command line, without pulling all the files from that repository?
The GitHub API now allows you to create, update, or delete a text file in one of your GitHub repositories at the command line, which creates a commit in the process; see this.
Alternatively, if you're not bent on using the command line, you can add a text file to one of your GitHub remote repo through the GitHub web interface; see this.
However, adding a file (text or otherwise) to a remote repository is not possible with Git itself. You have no other choice but to
(Of course, that's under the assumption that you have read and write access to that remote.)
Upvotes: 3