Skip to content

Instantly share code, notes, and snippets.

Brian Hedberg gemfarmer

Block or report user

Report or block gemfarmer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tsrivishnu
tsrivishnu / gitignore_already_tracked_file.md
Last active Jun 7, 2019
Git: Ignore already checked in file
View gitignore_already_tracked_file.md

Git: How can I ignore a file that is already committed to the repo?

You have a repo and quite some developers have cloned the repo and working on it. Now you want to add a file to gitignore which is already checked-in or tracked by Git.(The file is already commited into the repo)

Below are the steps on how to ignore this file (lets say the filename is config.py):

  • Add it to .gitignore:

       $ echo "config.py" >> .gitignore
@olivierlacan
olivierlacan / migrate_postgresql_database.md
Last active Nov 14, 2019
How to migrate a Homebrew-installed PostgreSQL database to a new major version (9.3 to 9.4) on OS X. See upgraded version of this guide: http://olivierlacan.com/posts/migrating-homebrew-postgres-to-a-new-version/
View migrate_postgresql_database.md

This guide assumes that you recently run brew upgrade postgresql and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.

First let's check something.

brew info postgresql

The top of what gets printed as a result is the most important:

You can’t perform that action at this time.