Reputation: 3937
I would like to clone a Laravel 4 from Git HERE and after using a Composer to install all dependencies, I wish to create a new Git on my HDD where I have my Dropbox synchronized.
Is it even possible ?
After getting Laravel 4 being cloned into C:/www/laravel-project/
, I would like to commit the whole project into my localhost REPO seating in D:/Dropbox/REPOS/Git/
so it will become D:/Dropbox/REPOS/Git/laravel-project/
Thanks
Upvotes: 1
Views: 1490
Reputation: 1002
There are two paths you can take to do this:
Option 1 is probably the easiest.
D:/Dropbox/REPOS/Git/laravel-project/
and do git init
to make an empty git repo.C:/www/laraval-project/
folder and do git remote -v
and save the URL for the current origin if you want to keep it.git remote origin set-url file:///D:/Dropbox/REPOS/Git/laravel-project
git remote add github url-you-saved-from-step-2
so you can do git pull github
if you want to update from the Laravel githubgit push -u origin master
and it should push into your Dropbox's git repo.For Option 2 you just skip steps 2 through 4 and - run git remote add dropbox file:///whatever
and change step 5 to git push -u dropbox master
or whatever branch you want. Once you use -u
once you can just do git push and it should push to whatever you set as your upstream with -u
.
Upvotes: 1
Reputation: 155
Two possible fixes:
Edit .git/config so that your origin is your repo (replace https://github.com/laravel/laravel.git
with file:///D:/Dropbox/REPOS/Git/laravel-project/
).
Delete the .git
directory and then run git init
and git remote add file:///D:/Dropbox/REPOS/Git/laravel-project/ origin
The problem I've seen with local directory repos is that the D:/Dropbox/REPOS/Git/laravel-project/
repo will need to be on a branch that will not be used (i.e. A DoNotUse branch).
Upvotes: 2