germaarizona.blogg.se

Create a local repository git on mac
Create a local repository git on mac












create a local repository git on mac

Sudo -u ralfwehner git -bare init -shared=groupįrom client side the developer’s project must be pushed into the new bare server repository: git remote add origin push origin master So, first create the bare repository on server side: sudo -u ralfwehner mkdir -m 770 /Users/ralfwehner/gitrepos/workshop.gitĬd /Users/ralfwehner/gitrepos/workshop.git workshop.git We create a new empty repository on the server side and copy the developer’s repository from client machine to server (recommended when using difference git versions on server and clients): For this step i will show two alternative ways:Ī) We clone the server’s repositiory on the client machine and copy it via scp up to the server: git clone -bare. Let’s assume the user ralfwehner is the repository admin user on server side. Then we have to create a bare repository on the server side. Git commit -m "initial repository creation" Create a working copy repositoryįirst, create a new local git repository and add all files within this folder. To simplify the following steps i will use the machine localhost as the server machine.

create a local repository git on mac

On server site, the new repository should be located unter ˜/gitrepos/workshop.git.We want to have a server that hosts the workshop project and new developer can get the repository using a ‘git clone …’ command.Our project folder workshop is not a git repository yet.We have a folder ˜/workshop, that contains the project on a local machine.














Create a local repository git on mac