My blogging workflow with Git
Just my blogging workflow.
- Configure
git
git config --global user.name "Murpholinox Peligro" git config --global user.email "murpholinox@gmail.com" git config --global core.editor vim
- Clone blog repository
cd mkdir Repos # Old way to clone a repo git clone https://github.com/murpholinox/murpholinox.github.io.git blog # New way to clone a repo, with SSH git clone git@github.com:murpholinox/murpholinox.github.io.git blog
Update: new way is more secure, but you have to generate your SSH keys and add them to GitHub. You can find the instructions here.
- Write post in
md
formatcd blog/ vim _posts/YYYY-MM-DD-title.md
- Exit
vim
, thengit add . git commit -m 'Usefulcomment' git push
Will ask for user id and password if cloning with the old way or passphrase if cloning with the new way.
If we edit something within GitHub then at our local repository we need to do git pull
.