git: remove secrets from history

Let’s say you’ve accidentally added a password into git. Here’s how you remove it:

1. if you have only committed locally

a. and it’s your last commit

  • just edit the file and run `git commit -a –amend`

b. and it’s a previous commit

  • do an interactive rebase with git rebase -i origin/master
  • change the pick to edit where you want to edit
  • amend the commit with git commit --amend
  • and continue with git rebase --continue

2. if you have committed and pushed to GitHub

Passive aggressive handovers

Possibly one of the worst handovers I’ve ever experienced. I overheard this recently when a consultant was doing a handover to a colleague. Some classics!

  • It’s all self-documenting code. It’s obvious
  • Oh, you need to run it in a separate profile to get it to work, Choose the Debug Profile
  • Come on, this is obvious. Don’t embarrass yourself by asking
  • You’ve asked three times already. Don’t embarrass yourself by asking
  • One moment, we’ll get there (in response to a question – and then never returning to the question)
  • Dunno if I’ve the energy
  • Will my batteries on my laptop survive? (when at 100%)

I’m not making this up. These were all real phrases!

And then there were all the passive-aggressive phrases like “Yes” or “No” in response to questions instead of elaborating and explaining.

And the git commit history was funny. Line after line of commit messages saying “WIP”! And all the merges to master were done by himself – no peer reviews.

You can’t make this stuff up!


Setting up my new Dell XPS Ubuntu 18.04 LTS laptop

  1. connect via Wifi
  2. launch Chrome, sign in to Google
  3. love that Ubuntu automatically enters your first key into the password box of the lock screen (rather than the Mac which uses your first keystroke to wake the screen so you have to wait before you can enter your password)
  4. launch Terminal (Ctrl Alt T) and install Terminator (sudo apt-get -y update; sudo apt-get install -y terminator); launch Terminator (terminator ); Add to Favourites; close Terminal
  5. Register for Ubuntu LiveUpdate (this automatically came up when I logged in)
  6. peel Intel sticker off
  7. Ubuntu Software > dconf editor
    1. update wm/preferences/button-layout and change
    2. :minimize,maximize,close to `close,maximize,minimize:`
  8. install
    1. curl:` sudo apt install curl`
    2. git: sudo apt-get install -y git
    3. zsh, oh-my-zsh: sudo apt-get install -y zsh:
    4. install powerline fonts: `sudo apt-get install fonts-powerline` (so much easier than on the Mac) –
    5. sudo apt-get install -y autojump;
    6. update zshrc plugins – i.e. to `plugins=(autojump docker extract git git-extras vagrant web-search )`