Skip to content
simongregory edited this page Sep 13, 2010 · 2 revisions

The point of TextMate is extensibility and configurability. It’s easy to tailor and extend to get your workflow feeling just right. Which means that the forks of bundles aren’t entirely committed to improving the features of the ‘master’ branch. They can be just as much about tweaking things for personal preference. This means that it’s never been possible to simply merge a feature from a fork when I get a pull request. So this doc serves to highlight the slightly unconventional purpose of the forks and describe the steps I follow when working with git.

Adding remote branches.

Once you’ve installed the bundle using git you can then start connecting to the different forks. I’ll use Lucas Dupin’s fork as an example as it’s well worth checking out.


git remote add lucasdupin git://github.com/lucasdupin/actionscript3-tmbundle.git
git fetch lucasdupin

Once this is done you can review the branch by checking it out.


 git co -b ld-fcshd lucasdupin/fcshd

However this isn’t necessary – you can cherry-pick or merge straight out.

Cherry Picking

Generally I then use git cherry-pick, which has worked without any problems so far. Although it does mean the commits aren’t identical to the original so there’s a vague chance that things can be out of sync across the forks.

Merging multiple commits from a branch

A lot of the features I add start out in the sg branch. When I started this branch I cleaned out a few things I didn’t want, so it can’t simply be merged into master. In order to merge the changes I’ve made into master it’s often easier to create a copy of the branch, rebase the series of commits I want onto master, checkout master and merge it with the rebased copy. Like so:


	git co -b sg-int sg
	git rebase -i master

The interactive switch will mean that the commit opens in your editor, from there you get to choose which commits from the branch to keep. Just comment out the commits you don’t want. If you get any conflicts you need to resolve them and then continue the rebase with (git rebase --continue)


	git co master
	git merge sg-int

If all goes well then you should simply have to push the results, and delete the integration branch with git br -D sg-int.

Clone this wiki locally