User Tools

Site Tools


windows:createaremotegitrepositoryinwindows

Differences

This shows you the differences between two versions of the page.


Previous revision
windows:createaremotegitrepositoryinwindows [2022/12/02 22:02] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Create a Remote Git Repository in Windows ======
 +
 +Here:
 +
 +http://freshbrewedcode.com/derekgreer/2012/02/19/hosting-a-git-repository-in-windows/
 +
 +You can find detailed instructions to create a remote git repository in windows **using shared folders**, but, to be honest, I found some of them strange, so I decided to write down my own ones. I humbly think they are shorter. 
 +
 +===== Create a shared folder per project you want to store =====
 +
 +I've decided to create a put-them-all folder called ''git'' and inside it, a repository per project:
 +
 +<code>
 +c:\shared resources> mkdir git
 +c:\shared resources> cd git
 +c:\shared resources\git> mkdir myproject
 +</code>
 +
 +===== Initialize the remote repository =====
 +
 +You have to do this per project: enter in the ''myproject'' folder and do a ''git init --bare'':
 +
 +<code>
 +c:\shared resources\git> cd myproject
 +c:\shared resources\git\myproject> git init --bare
 +</code>
 +
 +===== Share the project ===== 
 +
 +And then share the folder to someone you want. You have to replace the "PUT-AN-ALLOWED-USER-FOR-THE-SHARED-FOLDER" for an authorized user to see the content of the shared folder.
 +
 +<code>
 +C:\> net share myproject="c:\shared resources\git\myproject" /grant:PUT-AN-ALLOWED-USER-FOR-THE-SHARED-FOLDER,change /unlimited
 +</code>
 +
 +
 +
 +==== Pushing the project (instructions for eclipse) ====
 +
 +Step one: 
 +
 +Right-click on your project, and...
 +
 +{{ :windows:git-step-1.png?direct |}}
 +
 +Step two:
 +
 +{{ :windows:git-step-2.png?direct |}}
 +
 +~~DISQUS~~
 +
 +