June 8, 2013

Error writing git commit messages with vi

I typically write my git commit messages in the terminal, but today I wanted to write a multi-line comment so I left out the -m argument to git commit so it would open up my default editor, which is vi: git commit I wrote my comment, saved and exit but got an error: $ git commit error: There was a problem with the editor 'vi'. Please supply the message using either -m or -F option. ... Read more

May 8, 2013

Migrating from bitbucket to github

Migrating repositories between bitbucket and github couldn’t be simpler thanks to the design nature of DVCS like git because the entire history is already located on your machine within your projects .git folder. All you’re really doing is changing a remote. Open a terminal and navigate to your project directory. TLDR; For those who just want the commands with no explanation git remote rename origin bitbucket git remote add origin git@github. ... Read more

January 21, 2013

Adding a global ignore file for git

Quick setup of ignore files for Git. You can of course set these up per repo, but that gets a little old. Instead you can setup a single ignore file and link to it so that every repo refers to it. For example, create a git ignore file in your home directory: ~/.gitignore_global Fill it with regular files that you want to ignore: #.gitignore # Railo files # ###################### WEB-INF/ # Sublime files # ###################### *. ... Read more

© Michael Sharman 2017