![]() Many of my commits are with the repo in a "working" state, meaning it's not ready for release. Otherwise, I tend to use a single "main" branch and just commit as I go. I might create a branch for a major new feature if I expect to be working on it for a long time. ![]() ![]() Like if I were theoretically working on CodeKit 3, I'd have a separate branch so that I could switch back to my 2.0 branch and continue releasing updates for the existing app. No, Seriously, How Do You Use Git?įor me, Git is like Time Machine: a way to back up my work and roll back to a previous version when I realize I have my intern has seriously screwed up. When you switch and unpause CodeKit, the app warps to your new settings from that branch. Each branch has a different dekit file that contains different settings. Then, you might have a "release" branch where source maps are off and everything is minified. Have one person tweak settings as needed, commit their dekit file and then have everyone else pull that down and start working from there.Īnd finally, don't forget that settings may change if you switch branches! You might have a "debug" branch where you set CodeKit to create source maps, and so on. It helps a lot if you start a team project by getting everyone on the the same initial settings. Just compare the contents of the conflicting versions and choose the one that has the settings you want. The dekit file is plain-text JSON, so conflicts are easily resolved. When she un-pauses CodeKit, the app will immediately apply the settings from the new config file and boom-you're both on the same settings. Your teammate pulls the repo and gets your new config file. You change a setting, then commit your dekit file. This is how you sync CodeKit settings across teams. Let Git track this file and commit it along with the rest of your project. What About CodeKit's Config File?ĬodeKit stores project settings in a special file named "dekit". Their response so far has been: "HOW DARE YOU SPEAK TO US, PEASANT." Then they send Bob Mansfield after me. I've asked Apple Engineering to improve OS X by including the process ID of whatever app caused a file-change event. So, to CodeKit, a file-delete event from Git looks exactly like the event that happens when you drag a file to the trash. The trouble is that the kernel doesn't report what caused a file-change event it just reports that the event happened. RIGHT? CodeKit gets file-change information directly from the OS X kernel. That's all there is to it! Why Can't CodeKit Just Auto-Ignore Git Changes? Or choose File > Pause File Watching from CodeKit's menu.Īnytime you're going to perform a Git action that will change many files at once (a pull, branch-switch, etc.) you need to pause CodeKit's file-watching first. It's super easy to pause CodeKit: just hit command + option + control + / (It's the three keys next to the spacebar, plus a slash - like you're typing a comment!) This shortcut is global it works even if CodeKit is in the background. I'M SWITCHING TO GRUNT." Here's What Happened: All of a sudden, we discover that CodeKit now has completely different settings for "main.js"! After 20 seconds of cursing, we open up Mail.app and send Bryan a nasty email: "HOW CAN YOU SUCK AT PROGRAMMING THIS MUCH!? DID YOU ALSO WRITE discoveryd? YOU HAVE RUINED MY LIFE. In CodeKit, we've set some custom options for this file. ![]() In our project folder there's a file named "main.js". You know what's really good at changing files? Git. (I don't care if you created the damn format. You save a Gif, CodeKit asks you to pronounce "G-I-F" and deletes your hard disk if you get it wrong.You save a JS file, CodeKit minifies it.You save a Sass file, CodeKit compiles it to CSS.Using CodeKit With GitĪt its core, CodeKit is an app that watches files for changes and takes action when those changes happen. It's still Git, but it's like Git on Xanex: 50% less likely to sever my aorta. Ever seen the source code for Git? Here's the top of the README file: One day you're just writing some code and then.GODDAMN RAPTORS FALLING OUT OF THE CEILING WHAT DID YOU DO TO THE REPO WE'RE SUPPOSED TO SHIP TOMORROW!Īnd this isn't just my opinion. You poor soul that's exactly where she wants you. Git is your personal slave, willing and eager to bend to your every whim. You're just reading this because you heard I write funny release notes. You've forgotten more about computers than I'll ever know. The folks at Tower asked me to write about my experience with Git and how you can use CodeKit and Git together. It's won several awards including: "2014 App I've Never Heard Of" from John Gruber and "Why Does This UI Look So Familiar?" from Panic. It's an app for web developers that automates a bunch of tasks and makes building websites much faster. He's the creator of the popular CodeKit Mac app.
0 Comments
Leave a Reply. |