Skip to content

Setting Up Your Environment

icydee edited this page Jul 18, 2012 · 6 revisions

How to set up your development environment

I will not cover how to set up a full environment to run The Lacuna Expanse here. This is documented in various files in the distribution. However, I will assume that this has been set up and you now have a /data/Lacuna-Server directory.

When you initially created this directory you would have cloned it from your own forked repository with commands similar to the following. (change myaccount to be the name of your github account)

git clone [email protected]:myaccount/Lacuna-Server-Open.git

This will create a remote called origin

However, my personal preference is to be explicit about the remote origin name, especially when I have several directories with different remote repositories. So I would use something like.

git clone -o my-ls-open [email protected]:myaccount/Lacuna-Server-Open.git

Then rather than issuing git fetch origin master I would do git fetch my-ls-open master and know clearly that I am fetching from my repository.

Then, if I want to add the plainblack remote as well (so I can update my repository from it) I could add.

git clone -o pb-ls-open [email protected]:plainblack/Lacuna-Server-Open.git

and then there is no confusion when I do a git pull pb-ls-open master I know for certain where I am pulling from.

Most people will only have read-only access to the plainblack repository so there is no risk in pushing to it. However, if you do have push access and want to restrict it you can do the following.

git remote set-url --push pb-ls-open no_push

In this case, if you do accidentally try to push to the plainblack/Lacuna-Server-Open repository, it will result in a fatal message.

If you already have an origin and want to change it, you can add another remote as described above, then remove the origin remote.

git remote rm origin

If you have done this correctly then you should have the following

$ git remote -v
my-ls-open  [email protected]:myaccount/Lacuna-Server-Open.git (fetch)
my-ls-open  [email protected]:myaccount/Lacuna-Server-Open.git (push)
pb-ls-open  [email protected]:plainblack/Lacuna-Server-Open.git (fetch)
pb-ls-open  no_push (push)