Day 10 with Jobeet + Git

One of the things I have noticed after finishing day 10 of the Jobeet “tutorial” using git is that it could be possible after all to go back in time and develop some of the teasing questions of the tutorial at each step of the process.

So after finishing up day 10 I have all the code committed and I can see my logs:

[code]
commit 4d273d62eee6f1e87edb2d03ee3669d55dc7137f
Author: Luis Cordova <cordoval@gmail.com>
Date: Fri Nov 5 21:13:40 2010 -0500

added the requirement for displaying active jobs namely
$q->andWhere(‘j.is_activated = ?’, 1);

commit d2b6761c531f5f914c853eca4c1c85ed0b1a9e05
Author: Luis Cordova <cordoval@gmail.com>
Date: Fri Nov 5 21:08:22 2010 -0500

added the function publish used by the action publish from the actions class

commit f738e074c5859bd38284c57aa056bd6877a020e6
Author: Luis Cordova <cordoval@gmail.com>
Date: Fri Nov 5 21:04:11 2010 -0500

added the action publish in actions.class.php

commit 32cdd5c99b2f64ed61a656019b4124f1863c14a8
Author: Luis Cordova <cordoval@gmail.com>
Date: Fri Nov 5 21:01:49 2010 -0500

change the publish link from job_edit to job_publish

commit f1c5568624b769d15a4f02397fa0ba4266bdaa58
Author: Luis Cordova <cordoval@gmail.com>
Date: Fri Nov 5 20:58:00 2010 -0500

added functions for the partial + routing put for publish action

commit a4be28655cb667eef93edf6ef505a65705e08255
Author: Luis Cordova <cordoval@gmail.com>
Date: Fri Nov 5 20:42:58 2010 -0500

added partial _admin.php on job templates

create mode 100644 apps/frontend/modules/job/templates/_admin.php

commit b5319463d864f7c3c726052c68f2275275c00eee
Author: Luis Cordova <cordoval@gmail.com>
Date: Fri Nov 5 20:40:48 2010 -0500
[/code]

so if at any point I need to go back in time I will issue the command:

[code]
git revert 32cdd5c99b2f64ed61a656019b4124f1863c14a8
[/code]

And I will “return” to the state where I was at that point.

I just:

” change the publish link from job_edit to job_publish”

so I perhaps can explore some things with the code in that state and learn some more things about symfony. This is of course an example.

This will create a new commit with that version so I have to merge later with the last version of the local repo.

A better way to see the changes that I then did is issuing:

[code]
git show 32cdd5c99b2f64ed61a656019b4124f1863c14a8
[/code]

which will return:
[code]
commit 32cdd5c99b2f64ed61a656019b4124f1863c14a8
Author: Luis Cordova <cordoval@gmail.com>
Date: Fri Nov 5 21:01:49 2010 -0500

change the publish link from job_edit to job_publish

diff –git a/apps/frontend/modules/job/templates/_admin.php b/apps/frontend/module
index 3e8eda6..37f169b 100644
— a/apps/frontend/modules/job/templates/_admin.php
+++ b/apps/frontend/modules/job/templates/_admin.php
@@ -3,7 +3,7 @@
<ul>
<?php if (!$job->getIsActivated()): ?>
<li><?php echo link_to(‘Edit’, ‘job_edit’, $job) ?></li>
– <li><?php echo link_to(‘Publish’, ‘job_edit’, $job) ?></li>
+ <li><?php echo link_to(‘Publish’, ‘job_publish’, $job, array(‘method’ => ‘p
<?php endif ?>
<li><?php echo link_to(‘Delete’, ‘job_delete’, $job, array(‘method’ => ‘delet
<?php if ($job->getIsActivated()): ?>
(END)
[/code]

Then I can meditate on the code and learn how to do things for my other projects provided I can locate the descriptions easily. This means that I was good in describing what the feature commit was about so I can pull it out easily.

3 thoughts on “Day 10 with Jobeet + Git

  1. So, Luis, are you talking about going back into a history after a project is finished and rearranging the commits to make better documentation in the history? I hope my question makes sense.

  2. I was not talking about that yet, but that is another option, and it is made with git interactive feature. I was talking about revisiting older commits as test cases in order to explore some features we can learn from.

Leave a Reply

Your email address will not be published. Required fields are marked *