DEV Community

Discussion on: What's Wrong This Time? Part II: Electric Bugaloo

 
awwsmm profile image
Andrew (he/him) • Edited

The way I'm doing drafts right now is prepending wip- to the filename, and .gitignore-ing blog/wip-*. That means that drafts aren't under version control. This is fine for me (for now) because usually I have zero or one drafts at any given time.

Bringing drafts into version control is an interesting problem. As you say, it would require basically throwing out the idea that first commit == published date. Maybe a drafts directory is the easiest way to go? git log <filename> doesn't follow file renames by default (see --follow), so moving a file from drafts/ to blog/ could essentially be the "trigger" for publication.

Interesting stuff. Thanks for pointing this out!