内容简介:First, here's the config setup you need to even allow for such a radical concept.There are only two lines in my global gitignore file and they are both fairly useful pretty much all the time.This 2 line file means that no matter where I am, what project I'
Setting it up
First, here's the config setup you need to even allow for such a radical concept.
-
Define the global gitignore file as a global Git configuration:
git config --global core.excludesfile ~/.gitignore
If you're on OSX, this command will add the following config lines in your
~/.gitconfigfile.[core] excludesfile = /Users/triplegirldad/.gitignore
-
Load that
~/.gitignorefile up with whatever you want. It probably doesn't exist as a file yet so you might have to create it first.
Harnessing its incredible power
There are only two lines in my global gitignore file and they are both fairly useful pretty much all the time.
$ cat ~/.gitignore TODO.md playground
This 2 line file means that no matter where I am, what project I'm working on, where in the project I'm doing so, I have an easy space to stash notes, thoughts, in progress ideas, spikes, etc.
TODO.md
More often than not, I'm fiddling around with a TODO.md file. Something about writing markdown in your familiar text editor speaks to my soul. It's quick, it's easy, you have all the text editing tricks available to you, and it never does anything you wouldn't expect (looking at you auto-markdown-formatting editors). I use one or two # for headings, I use nested lists, and I ask for nothing more. Nothing more than more TODO.md files that is!
In practice I tend to just have one TODO.md file per project, right at the top, ready to pull up in a few keystrokes. Which I do often. I pull this doc up if:
- I'm in a meeting and I just said "oh yeah that's a small thing, I'll knock it out this afternoon".
- I'm halfway through some feature development and realize I want to make a sweeping refactor elsewhere. Toss some thoughts in the doc, and then get back to the task at hand.
- It's the end of the day and I have to switch my brain into "feed small children" mode, thus obliterating everything work-related from my short term memory. When I open things up the next day and know exactly what the next thing to dive into was.
- I'm preparing for a big enough refactor and I can't hold it all in my brain at once. What I'd give to have an interactive 3D playground for brain thoughts, but in the meantime a 2D text file isn't a terrible way to plan out dev work.
playground
Sometimes you need more than some human words in a markdown file to move an idea along. This is where my playground directory comes in. I can load this directory up with code that's related to a given project and keep it out of the git history. Because who doesn't like a place to play around.
I find that this directory is more useful for long running maintenance projects over fast moving greenfield ones. On the maintenance projects, I tend to find myself assembling a pile of scripts and experiments for various situations:
- The client requests a one-time obscure data export. Whip up some CSV generation code and save that code in the playground directory.
- The client requests a different obscure data export. Pull up the last time you did something vaguely similar and save yourself the startup time.
- A batch of data needs to be imported just once. Might as well stash that in the chance that "just once" is actually "just a few times".
- Kicking the tires on an integration with a third party service.
Some of these playground files end up being useful more times than I can count (eg: the ever-changing user_export.rb script). Some items get promoted into application code, which is always fun. But most files here serve their purpose and then wither away. And that's fine. It's a playground, anything goes.
Wrapping up
Having a personal space for project-specific notes and code has been helpful to me over the years as a developer on multiple projects. If you have your own organizational trick, or just want to brag about how you memorize everything without any markdown files, let me know in the comments below!
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
进化式运营:从互联网菜鸟到绝顶高手
李少加 / 电子工业出版社 / 2016-11 / 59
互联网运营作为一个新兴的岗位,一方面它是企业的核心岗职,身负重任,另一方面,又由于其短暂的历史,缺乏成熟体系的工作方法论,而目前业界主流的运营方法却是从企业视角出发,存在极大的改进空间。 《进化式运营:从互联网菜鸟到绝顶高手》作者基于自身十年的互联网洞察、实践经验,并融合了信息论、心理学、经济学、管理学、甚至包括生态学、进化论等跨学科跨学业的知识,从无到有地构建了一套全新的互联网运营体系:基......一起来看看 《进化式运营:从互联网菜鸟到绝顶高手》 这本书的介绍吧!