Create a GitHub Merge Batch File
Before I start updating my local clone of the MooTools More or Core libraries, I need to update to the most current version on GitHub. Call me lazy, but I'm tired of typing the commands lines into msysgit all the time. I've created a batch file that does the work for me.
The Batch Script
git fetch git://github.com/mootools/mootools-core.git master:coco
git merge coco
What I'm doing is:
- Going out to GitHub, grabbing the current "Core", and putting it into a branch called "coco."
- Merging it with my current local copy.
Pushing it to my GitHub account.
I know that's not a lot to type, but this script lets me move things along a tiny bit faster. The "push" updates my repository at GitHub right away too. It's also probably important to mention that my operating system is Windows XP.
![Facebook Open Graph META Tags]()
It's no secret that Facebook has become a major traffic driver for all types of websites. Nowadays even large corporations steer consumers toward their Facebook pages instead of the corporate websites directly. And of course there are Facebook "Like" and "Recommend" widgets on every website. One...
![Animated 3D Flipping Menu with CSS]()
CSS animations aren't just for basic fades or sliding elements anymore -- CSS animations are capable of much more. I've showed you how you can create an exploding logo (applied with JavaScript, but all animation is CSS), an animated Photo Stack, a sweet...
![Fx.Rotate: Animated Element Rotation with MooTools]()
I was recently perusing the MooTools Forge and I saw a neat little plugin that allows for static element rotation: Fx.Rotate. Fx.Rotate is an extension of MooTools' native Fx class and rotates the element via CSS within each A-grade browser it...
![MooTools Flashlight Effect]()
Another reason that I love Twitter so much is that I'm able to check out what fellow developers think is interesting. Chris Coyier posted about a flashlight effect he found built with jQuery. While I agree with Chris that it's a little corny, it...
do once:
git remote add mootools git://github.com/mootools/mootools-core.git
then do:
git pull mootools master
done.
Ha Chris . .beat me too it!
And yeah, the above would be a lot easier
/Matt
Thanks for the tip Chris and Matt!
Way to automate, David :)
Laziness FTW!
I think this is mildly dangerous. Whenever you merge w/ another codebase you should ensure that the chnaged files are updating things you want. But it’s not uncommon for the changes to create merge conflicts. Having the push in your batch file means that you’re going to try and push those changes without the opportunity to review them.
For what it’s worth, I prefer to use rebase instead of merge when I can…
@Aaron Newton: Good call. Removed from my local file.
You could make a little tutorial on how to checkout, merge, commit stuff to the mootools project hehe, i would be one to appreciate it.
Thanks for sharing.