Development

Ignoring Files and Folders in Git

Ignoring Files and Folders in Git

Just a hint, it's a lot easier than Subversion. My love for Subversion grows colder each day.

In your repository root directory you'll want to create a file called .gitignore. In that file you'll want to specify files and folders to ignore. For example.

Ignore the entire Magento /media folder.

media/**/*

The root repository .gitignore file will act as a global but can be overridden in subdirecties by creating a .gitignorein those directories.

A Gotcha!
Empty directories do not get tracked by Git. If you want them to be tracked, they need to have something in them. Usually doing a touch .gitignore is enough to keep the folder tracked.

This one stumped me for a little bit, anyway, it pays to read.

Credit:
http://www.gitready.com/beginner/2009/01/19/ignoring-files.html
http://github.com/guides/ignore-for-git

Working with SVN branches

Working with SVN branches

To keep all may changes different from the main development I've created a subversion branch. Now I want to keep the branch up to date with changes from the main trunk.

Get all the history of this particular branch.

svn log --stop-on-copy
------------------------------------------------------------------------
r421 | sstillwell | 2010-01-22 18:40:42 -0600 (Fri, 22 Jan 2010) | 1 line
 
merged changes from trunk to branch, 406:420
------------------------------------------------------------------------
r420 | sstillwell | 2010-01-22 18:30:52 -0600 (Fri, 22 Jan 2010) | 1 line

Fighting the machine

Fighting the machine

So today I spent an ungodly amount of time trying to figure out why my Magento module, that worked just fine on my local MAMP installation, didn't work on the Linux staging server.

I thought it was the cache, so I reloaded the cache, changed the cache backend, then I thought it might be a but, then I thought it might be the layouts. The solution? Case. Mac is not case sensitive, Linux is.

A handy little SQL statement

A handy little SQL statement

Have a look at the following SQL

SET @salt=SUBSTRING(MD5(RAND()),-20);

This will set a variable called @salt that has a random string of 20 characters.

SVN add all unversioned files at once

SVN add all unversioned files at once

If you want to add all the unversioned files at once to subversion, then you either have to type in all the paths or try this.

Add this to your .bash_profile

svn_add_all(){
svn status | grep "^?" | awk '{print $2}' | xargs svn add
}

Then typing svn_add_all will add all the files underneith your current working directory.

Installing Zend Server on Centos to run Magento

Installing Zend Server on Centos to run Magento

Installed Zend Server CE on one of my servers today.

Installing Zend Server CE via yum on Centos

To install via YUM, you can add the Zend repo as /etc/yum.repos.d/zend.repo

  [Zend]
  name=Zend CE $releasever - $basearch - Released Updates
  baseurl=http://repos.zend.com/rpm/ce/$basearch/
  enabled=1
  gpgcheck=0
  [Zendce-noarch]
  name=Zend CE - noarch
  baseurl=http://repos.zend.com/rpm/ce/noarch
  enabled=1
  gpgcheck=0

Then run yum install zend-ce

SVN ignore in all subdirectories

SVN ignore in all subdirectories

Migrating Gift Certificates from Xcart to Magento

Migrating Gift Certificates from Xcart to Magento

Youre migrating to Magento from Xcart and want to offer gift certificates (GC) on Magento and you want to take all the active gift certificates over to Magento as well.We'll be using the wonderful GC extension at http://www.magentocommerce.com/extension/reviews/module/751/gift-certificates--virtual-cards

1. Dump the gift cert data from Xcart to a csv file.

 

Understanding Subversion Vendor Branching

Understanding Subversion Vendor Branching

Since I'm still a newbie at SVN, getting the hang of Vendor Branching has taken me a little longer than I'm willing to admit.

Here are some resources that I found helpful.

Merging a branch back into the trunk with Subversion

Merging a branch back into the trunk with Subversion

I'm just getting the hang of using Subversion for version control and the workflow is starting to gel. One issue I came against yesterday was merging a branch back into the trunk. The process is a bit interesting.

  1. Copy your trunk to a branch svn copy <a href="http://path.com/to/trunk" title="http://path.com/to/trunk">http://path.com/to/trunk</a>  http://path.com/to/branch/example
  2. Switch your working copy to the branch
  3. Check your URL with svn info
  4. Make changes to code
  5. Commit back to branch svn ci -m "made my changes to branch example"
  6. Switch your working copy back to TRUNK
Syndicate content