Skip to content

Instantly share code, notes, and snippets.

@mindplay-dk
Created November 16, 2012 01:38
Show Gist options
  • Select an option

  • Save mindplay-dk/4083141 to your computer and use it in GitHub Desktop.

Select an option

Save mindplay-dk/4083141 to your computer and use it in GitHub Desktop.
GitHub feature request: "micro edits"

Micro Edits

A GitHub Feature Request

I propose a feature that lets you edit one line of code, in place, instantly, no hassle - providing nothing but the updated line of code, and a short 1-line comment explaining why you'd like to make this change.

Why? Because it's the little things that count. How often do you glance over code on GitHub and think, "oh, I could fix that real quick". But you don't want to fork the project and submit a pull-request, much less have to maintain your own fork (and have it show up on your GitHub page) so you just leave it alone.

Think of the overall quality increase, if all those little tweaks got made every time somebody spots something ugly, and actually made it into people's codebases - many drops make an ocean, right?

Essentially, think of this as a "micro-fork" of a single file, without the overhead of forking the entire project, and having that show up in public. Only the person who owns the edited file would see a list of submitted micro-edits, and would be able to approve/merge them (or reject/trash them) with a single click.

Alternative suggested names for this feature:

  • "micro edits"
  • "micro fork"
  • "tweaks"

Expanding on this idea a little bit

More than one line of edits could be allowed, but you would absolutely have to stay within the same file. For anything involving more than "tweaks", you should have to fork and submit a pull-request.

Perhaps there could be two "degrees" of micro edits:

  1. A single line, with a single-line comment explaining why.
  2. Multiple lines within the same file, with a multi-line (but short) comment explaining why.

This feature should encourage people to make those little tweaks/edits that aren't necessarily even functional - or really should not be. Maybe you're just adding inline comments to the code or fixing a code standards violation.

The point is, such edits should be quick and unobtrusive.

You just look silly forking 10,000 lines of code to change one or two lines, and so it doesn't get done.

Fork and/or comment on this?

Thanks for reading!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment