From SoylentNews
Revision as of 12:27, 20 April 2014 by (talk) (PUSHING CHANGES TO crutchy-/slashcode REMOTE REPOSITORY ON GITHUB)

Jump to: navigation, search

I'm just a regular pleb from Australia. I'm not a member of the Soylent staff.

PHP/SQL/HTML/CSS and Delphi (Object Pascal) are my preferred languages.

Look out for me on Soylent IRC (#Soylent,##,#test)

Crutchy's perl journal:

Code doc project:

slashdev journal:

Watch pages:
CSS Work


# apt-get install git
$ git config --global "crutchy"
$ git config --global ""
$ git config --global credential.helper cache
$ git config --global credential.helper 'cache --timeout=3600'

In my case /var/www/slash is served by apache2 (just on local network). This will be different if you're using the slashdev VM.

$ cd /var/www/slash

$ mkdir git
$ cd git

This creates the directory where I will keep local copies of all my git projects.


After logging into GitHub, click the fork button on the Soylent/slashcode repository github page @

$ cd /var/www/slash/git

Download files into a subfolder named slashcode:

$ git clone
$ cd slashcode

When a repository is cloned, it has a default remote called "origin" that points to your fork on GitHub, not the original repository it was forked from. To keep track of the original repository, you need to add another remote named "upstream"

$ git remote add upstream

Push commits to your remote repository stored on GitHub:

$ git push


Add any files modified to the git commit index:

$ git add filename1
$ git add filename2
$ git commit -m "update message"
$ git push


If you want to request the changes that you've made to your fork of slashcode be merged into the upstream repository (SoylentNews/slashcode), you will need to create a pull request.

You do this from

The pull request button is a little green button to the left of the branch combo. Click it and follow the prompts.


Fetch any new changes from the original repository:

$ git fetch upstream

Merge any changes fetched into your working files:

$ git merge upstream/master


The purpose of this was to allow me to share a single local git repository on both the slashdev VM and my host machine.

I'm a perl noob, but I wanted the flexibility of being able to concurrently work on tweaking slashcode to possibly in the apache2/mod_perl2 vhost on my host machine - onfiguration details can be found here:

I also want to be able to develop changes that I can test in the VM.

From within VM, to to Devices menu and click "Shared Folder Settings...".

Create a shared machine folder (-readonly,+automount,+permanent) to the /var/www/slash/git/slashcode directory on the host machine.

In a terminal inside the VM:

$ sudo adduser slash vboxsf

Reboot VM.

Again, from a terminal inside the VM:

$ rm /srv/slashdev/slashcode
$ ln -s -T /media/sf_slashcode /srv/slashdev/slashcode

Need to make sure your VM time is set a bit ahead of your host machine time to avoid "Clock skew detected." errors when running script inside the VM. I noticed that script takes a little longer to finish, but does eventually finish. Tested and seems to work fine for me.

crutchy's test image