Pages

Sunday, March 30, 2014

Using OSX keychain to store git credentials

On Mac if you have the latest version of git, you can use following command to tell git to use OS X keychain.

git config --global credential.helper osxkeychain

Note that the credential helper only works with HTTPS requests.

Wednesday, March 12, 2014

Updating git repo with changes in .gitignore

When .gitignore file is updated, the changes do not appear to take effect in the output of git status. Following set of commands will update git with the changes.

git rm -r --cached .
git add . --all
git commit -am "Updated .gitignore"

Note that these commands must be executed in your project root.