Skip to content

Instantly share code, notes, and snippets.

@jsifalda
Last active December 16, 2015 20:49
Show Gist options
  • Save jsifalda/5495469 to your computer and use it in GitHub Desktop.
Save jsifalda/5495469 to your computer and use it in GitHub Desktop.
Approach to create local git repository
# Create local repo
cd ~
mkdir repositories
cd repositories
mkdir localRepo.git
cd localRepo.git
git init --bare --shared=true
# Add remote to local repo in your project
cd myProject
git remote add local ~/repositories/localRepo.git
git push local --all
# Add local repo into your app via composer.json
# "repositories": [
# {
# "type": "vcs",
# "url": "~/projects/myProject.git"
# }
# ],
# "require":{
# "php": ">= 5.4.0",
# "projects/project":"dev-master"
# },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment