Friday, January 23, 2009

git cheat sheat

Found some nice cheat-sheets for git:
To set the user and e-mail used when making a commit to your git repo, use:

git config 'John Doe'
git config

If you are using gitorious, you might find handy to use an alternate ssh key made specifically for gitorious upload. You could make such a key with:

ssh-keygen -b 4096 -C

Save the key under ~/.ssh/id_rsa_johndoe_example_com and modify ~/.ssh/config to:

Host gitorious

Upload the public key to gitorious. After that, you'll be able to use the new key to push your changes to gitorious using the id_rsa_johndoe_example_com key.

Another very useful setting for using git with CMake is to add the build/ dir into your .git/info/exclude file so that git status ignores all build files.

No comments:

Post a Comment