ColdFusion Developer Week 2012

Adobe's second ColdFusion Developer Week kicks off today, June 4, and continues through Friday, June 8, 2012. Whether you're a new or experienced CFML developer, there's probably more than one session you'll find very interesting and useful. From basics to advanced language features, as well as frameworks and a focus on the new ColdFusion 10 release, there's just loads of good stuff, all provided via free online Webinars.

Check out the sessions and schedule, and sign up.

Like last year, I'll be presenting Improve Your Apps Through Unit Testing, tomorrow.

I also hope to revive this sleepy blog with some more interesting tid-bits soon, so stay tuned! It's been a busy year, but I've queued a number of topics for blog posts, so hopefully I can catch up a little in the near future.

Git Global Ignores, Can Be Overridden

First off, I'm loving Git (fast/awesome/free/open-source distributed version control system). If you haven't already, check it out!

I'd like to briefly mention how to ignore certain files from version control, both by project and globally. I'd also like to confirm that it's very easy to add files to version control, which are normally globally ignored.

Git makes it simple to ignore certain files/directories/patterns from version control by creating a .gitignore file in your project root, and optionally in any sub-directory. Check out the gitignore docs page for more.

That said, I quickly found myself ignoring the same patterns for every repository. Fortunately, Git also makes it easy to globally ignore patterns. You just set a global config property of core.excludesfile to tell Git where to look for a global gitignore file. The following two commands take care of setting the property and creating a file with a few popular ignore patterns.

git config --global core.excludesfile ~/.gitignore
printf ".project\n*.iml\n.idea/\nWEB-INF/\n" >
> ~/.gitignore

The above commands will work on both Linux and Mac. Windows users will likely want to locate a global .gitignore file in some common user settings directory. You can then create/edit the text file any way you'd like.

For me, on Ubuntu Linux, I end up with a /home/jkrug/.gitignore file that looks like this:

.project
*.iml
.idea/
WEB-INF/

You can also manually edit your .gitignore file, of course, and add comments if you'd like:

# Eclipse project files
.project

# IntelliJ IDEA project files
*.iml
.idea/

# Java WAR directories
WEB-INF/

Now here's the bonus: if you have one repository in which you'd like to add a file that is globally ignored to version control, you can do so. Simply use a standard add command with a -f flag, e.g.,

git add -f WEB-INF/web.xml

The global ignores are especially useful to me when I fork a project that may not have an ignore for my primary IDE's (IntelliJ IDEA) configuration files. And when I have a custom project in which I'd like to add one of those global ignores--no problem!

Happy versioned coding :)

BlogCFC was created by Raymond Camden. This blog is running version 5.9.2.002. Contact Blog Owner