Git & Titanium Tips
Up until recently most of my SCM experience has been around SVN and the Microsoft tooling. After jumping into the Titanium eco system I quickly found git was the best way to manage these projects.
Below are two tips I found helpful in reducing my commit noise and better managing my repos.
I also recommend checking out a great wiki article on Spheriki called "Git for the lazy". It is a fast way to get started.
Ignore Build Directories
By adding a .gitignore file into the root of your /[project]/build directory you can avoid having git track the files that Titanium auto generates. You should be versioning your apk and .app files that you send to your testers, but I found that I do so many compiles it is best to have a separate process for this.
Creating your .gitignore file:
- Open terminal and go to your project’s build directory. It should be something like [Your Workspace]/[Your Project Name]/build
- In terminal type nano .gitignore
- The nano edit will open in your terminal session
- Add the tmp, android/, and iphone/ entries you see below
- Press Control + X to exit
- Press Y to save your changes
- Press return to finish
tmpandroid/iphone/Tell git to globally ignore .DS_Store files
Another pet peeve of mine is around .DS_Store files. To globally ignore them just open a terminal window and type the below.
git config --global core.excludesfile ~/.gitignore
echo .DS_Store >> ~/.gitignore
