So I just started to use GitHub for a tiny project, and wanted to use it from inside of MonoDevelop. After 2 days of looking on and off for the “easy” answer, I never found it. Yes – I’ll do just about anything to avoid dropping down to the command line if possible.
Finally I found this answer at StackExchange:
I don’t find the accepted answer all that helpful. If you’ve got local source code you want to add to a new remote new git repository without ‘cloning’ the remote first, do the following (I often do this – you create your remote empty repository in bitbucket/github, then push up your source)
- Create the remote repository, and get the URL such as
If your local GIT repo is already set up, skips steps 2 and 3
- Locally, at the root directory of your source,
- Locally, add and commit what you want in your initial repo (for everything,
git add .
git commit -m 'initial commit comment')
- to attach your remote repo with the name ‘origin’ (like cloning would do)
git remote add origin [URL From Step 1]
- to push up your master branch (change master to something else for a different branch):
git push origin master
And things start working from inside of MonoDevelop then. But it just didn’t seem possible to get it working from directly inside of MonoDevelop.
For some reason the commit command there didn’t work for me, but just using “git commit” was enough.
One thing to note though, when using Git from the command line, it may drop you into VIM, so if you don’t already use VIM or VI, or don’t remember it’s many esoteric commands, you’ll need to get up to speed just enough to switch between command and visual mode and to save and exit.