#Creating a local file based upstream remote for Git.
#####(This works with GitHub for windows without pushing to the web!)
###Set up the new bare repo on the on your local file system: (a bare repo has not workspace it is used for sharing only. By convention it has .git in the folder name since there is no .git sub-directory in the repositiory)
C:\ORIGIN >git init --bare MyProject.git
Initialized empty Git repository in C:/ORIGIN/MyProject.git/
C:\ORIGIN >cd MyProject.git
###Add the remote repository to your existing local git repo and push:
#####(On GitHub for windows you can just change the primary remote in the Repository settings screen to file://"C:/ORIGIN/MyProject.git")
C:\Projects\MyProject [master]> git remote add origin file://"C:/ORIGIN/MyProject.git"
C:\Projects\MyProject [master]> git push origin master
To file://C:/ORIGIN/MyProject.git
C:\Projects\MyProject [master]>
git wouldn't accept the first command with "-bare" I think it should be "--bare" , and that worked OK for me.