Posts

Showing posts from 2015

How to create a local GIT server for an existing project

This post will describe how to create a local Git server based on a existing project in a secure way, meaning that you will not have any risk to lose information, unless you delete something by your own. 1. Create a home directory for your Git server. This is a folder that will contain your versioned projects on Git. After you have everything set, you will connect here and clone your local copies and push changes you made. This will be your local Git server. mkdir < /home/git_server/> 2. Inside your Git server directory, initilize a Git repository for your existing project. This command creates an empty dir, where you will push your existing project´s cod e. cd < /home/git_server/> git init --bare < any_project_name .git>   Now your dir structure is something like this   < /home/git_server/ any_project_name .git> 3. Copy your working project to some tmp dir anywhere: cp -r  < your_project_dir> < copy_of_your_project> 4. G