User:Crutchy: Difference between revisions

From SoylentNews
Jump to navigation Jump to search
No edit summary
 
(8 intermediate revisions by 2 users 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>


Crutchy's perl journal: http://soylentnews.org/~crutchy/journal/72
http://soylentnews.org/~crutchy/
 
Code doc project: http://soylentnews.org/~crutchy/journal/82
 
slashdev journal: http://soylentnews.org/~crutchy/journal/114
 
Watch pages:<br>
[[Development]]<br>
[[Style]]<br>
[[CssWork|CSS Work]]<br>
[[IRC]]<br>
 
==Git/GitHub==
 
<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 crutchy-/slashcode REMOTE REPOSITORY ON GITHUB===
 
Add any files modified to the git commit index:
<pre>
$ git add "plugins/Ajax/htdocs/images/core.js"
$ git add "themes/slashcode/templates/dispComment;misc;default"
</pre>
Commit the changes to the local repository index:
<pre>
git commit
</pre>
Nano will open with a commented summary of indexed changes.
 
You must enter a commit message.
 
^O followed by ^X to save and close nano.
 
Will get something silimar to following:
<pre>
[master d573b6d] collapsing/expanding comment tree. changed js function to something more generic.
2 files changed, 13 insertions(+), 1 deletions(-)
</pre>
 
<pre>
$ git push
</pre>
for master branch can just d:
<pre>git push</pre>
 
will output something like the following:
 
<pre>
Counting objects: 21, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (11/11), 1.06 KiB, done.
Total 11 (delta 8), reused 0 (delta 0)
To https://github.com/crutchy-/slashcode.git
  98b4168..d573b6d  master -> master
</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/