I like blogging from time to time, but I wish I could do things the way I like. One issue I have with having my blog here on wordpress is that I don’t have a local copy of it on my machine & it isn’t versioned in a repository (which has basically become my obsession). I wanted to find a solution that gave me these two things, and the flexibility to do anything else (such as in what markup to write the posts). Continue Reading
dvcs
All posts tagged dvcs
This is for Ruby on Rails and Mercurial users, such as myself 🙂
- cp .gitignore .hgignore
- .hgignore: prepend syntax:glob: sed -i ‘1i syntax: glob\n’ .hgignore
- .hgignore: sort: sed -i ‘1,2d’ .hgignore && LC_ALL=C sort .hgignore && sed -i ‘1i syntax: glob\n’ .hgignore
- echo “Gemfile.lock” >> .hgignore
- (echo ‘*.swp’ >> .hgignore; echo ‘.idea/’ >> .hgignore)
- find . -name ‘.git*’ -delete
- find . -type d -empty -exec touch {}/.keep \;
- hg init
- hg ci -Am ‘Generate project, setup .hgignore & remove .git*’
(Edit: Split add header and sort, otherwise it trunks the first 3 lines of .hgignore prematurely)
(Edit: Simplify the two modification 1-liners using sed)