Noomak
Noomak

Reputation: 371

GIT how to create a repo on virtual machine

I want let my team work on a Windows Virtual Machine where everyone has already its own access with user/pwd.

I want to store the repo in G:\repo and let each developer to clone from it.

I need to understand which are best practices for create local repository and let other clone it for development usage (till commit and push)

Unfortunatelly a remote repo is forbidden for the moment, so I'm trying this workaround.

Upvotes: 1

Views: 2653

Answers (1)

bahrep
bahrep

Reputation: 30662

First of all, you should read the documentation.

  1. Run git init G:\repo --bare to initialize bare git repository in this directory. With --bare option you create the repository without working directory.

  2. As you say "remote repo is forbidden", I can guess that you can't make this repository available over HTTP(S) to other team members. In such case, you could share G:\repo directory on your LAN. Access the repository using the file:// access schema and including the UNC path to the repository file://\\server\repo. It's now time to import the initial data to the repository, so run git clone file://\\server\repo.

  3. Put the contents of your project to the cloned repository, git add & git commit them to master.

  4. git push --set-upstream origin master the project's data to the remote bare repository on your virtual machine.

Upvotes: 3

Related Questions