User:Crutchy: Difference between revisions

From SoylentNews
Jump to navigation Jump to search
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
PHP/SQL/HTML/CSS and Delphi (Object Pascal) are my preferred languages.<br>
PHP/SQL/HTML/CSS and Delphi (Object Pascal) are my preferred languages.<br>


Look out for me on Soylent IRC (#Soylent,##,#test)<br>
Look out for me on Soylent IRC (#Soylent and #)<br>


==Git/GitHub==
http://soylentnews.org/~crutchy/
 
<pre>&#35; apt-get install git</pre>
 
<pre>
$ git config --global user.name "crutchy"
$ git config --global user.email ""
$ git config --global credential.helper cache
$ git config --global credential.helper 'cache --timeout=3600'
</pre>
 
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.
<pre>
$ cd /var/www/slash
 
$ mkdir git
$ cd git
</pre>
This creates the directory where I will keep local copies of all my git projects.
 
===FORKING THE "slashcode" REPOSITORY===
 
After logging into GitHub, click the fork button on the Soylent/slashcode repository github page @ https://github.com/SoylentNews/slashcode
 
<pre>$ cd /var/www/slash/git</pre>
 
Download files into a subfolder named slashcode:
<pre>
$ git clone https://github.com/crutchy-/slashcode.git
$ cd slashcode
</pre>
 
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"
 
<pre>$ git remote add upstream https://github.com/SoylentNews/slashcode.git</pre>
 
Push commits to your remote repository stored on GitHub:
<pre>$ git push</pre>
 
===PUSHING CHANGES TO GITHUB===
 
Add any files modified to the git commit index:
<pre>
$ git add filename1
$ git add filename2
$ git commit -m "update message"
$ git push
</pre>
 
===CREATING A PULL REQUEST===
 
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 https://github.com/crutchy-/slashcode
 
The pull request button is a little green button to the left of the branch combo. Click it and follow the prompts.
 
===UPSTREAM CHANGES===
 
Fetch any new changes from the original repository:
<pre>$ git fetch upstream</pre>
 
Merge any changes fetched into your working files:
<pre>$ git merge upstream/master</pre>
 
===WORKING OUTSIDE SLASHDEV VIRTUAL MACHINE===
 
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: http://soylentnews.org/~crutchy/journal/72
 
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:
<pre>
$ sudo adduser slash vboxsf
</pre>
 
Reboot VM.
 
Again, from a terminal inside the VM:
<pre>
$ rm /srv/slashdev/slashcode
$ ln -s -T /media/sf_slashcode /srv/slashdev/slashcode
</pre>
 
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 deployslash.sh script inside the VM.
I noticed that deployslash.sh script takes a little longer to finish, but does eventually finish.
Tested and seems to work fine for me.
 
 
[[File:crutchy_test.jpg|crutchy's test image]]

Latest revision as of 09:34, 20 February 2015

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 and #)

http://soylentnews.org/~crutchy/