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!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The way I'm doing drafts right now is prepending
wip-
to the filename, and.gitignore
-ingblog/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 fromdrafts/
toblog/
could essentially be the "trigger" for publication.Interesting stuff. Thanks for pointing this out!