#git #bash #productivity

Change the date of a git commit

One of the greatest and worst things with git is that you can rewrite the history. Here’s a sneaky way of abusing that, I can’t think of a legitimate reason to do this. As with anything, thanks StackOverflow for all the options I can pick from 👍. Set the date of the last commit to the current date GIT_COMMITTER_DATE="$(date)" git commit --amend --no-edit --date "$(date)" Set the date of the last commit to an arbitrary date GIT_COMMITTER_DATE="Mon 20 Aug 2018 20:19:19 BST" git commit --amend --no-edit --date "Mon 20 Aug 2018 20:19:19 BST" ...

  • Hugo Di Francesco
    Author
1 min read
#tooling #git #ci #bash

Deploy to multiple environments with git and CircleCI

Easily deploying to multiple environments in a simple manner using GitHub, CircleCI and Heroku. Continuous Integration is awesome, but sometimes you need a buffer between auto-deploying things on merge and the production release. To do that with CircleCI requires some git branch-wrangling and a few lines of bash scripting. We’ll imagine a scenario where a deploy is trivial (ie. we’ll pretend we’re using Heroku). For more complicated build steps we should still be able to follow similar principles. ...

  • Hugo Di Francesco
    Author
5 min read