0

I want my .NET/C# app to upload a few files to my Github repo. How can I do that?
Also, is local repo necessary for that? As the app won't be making changes to whole repo, only uploading a few files.

Tried using Octokit, but couldn't figure out how to push to remote repo.

mindaugasw
  • 1,116
  • 13
  • 18
  • 1
    There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs. See the [How to Ask](http://stackoverflow.com/help/how-to-ask) page for help clarifying this question. – Dylan Wheeler Jul 19 '16 at 18:51

2 Answers2

2

Octokit is to manage everything else other than the repository in github.

If you want your application to manage a git repository, either call directly 'git.exe' or use libgit2sharp, a C# lib to manage git repositories.

But you won't be able to "push" files directly. You will have to create at least a commit and push it to the github remote...

Philippe
  • 28,207
  • 6
  • 54
  • 78
-1

Git is a distributed source control system... this means the every git repositories has it's own files with it's own track of changes. In other words, all git repositories has it's own commits, merge, branchs...

As you have your local repository, you have to commit things on it and, after that, you are able to push things to the remote repositoy.

Git allows you to commit remotely in other branchs, but this is no the fun of using git... The main advantaged IMHO it's to have your commits separeted, and push them to anywhere/whenever you want.

So... try to:

git add .
git commit -m "MESSAGE"
git push
Lair Jr
  • 64
  • 2