Git
Tutorial
- Tutorial on How to Use Git and Github from Udacity. The tutorial is free.
- Learn about Git at GitHub Guides
Commands
- To see git hitsory, run:
$ git log --graph --oneline --decorate
- Set up user name/email address
$ git config --global user.name <username> $ git config --global user.email <mailaddress>
- To save Git password
$ git config --global credential.helper store
Configuration
- Setup proxy configurations for Git when using Git behind a corporate proxy, e.g.,
http://10.0.0.0:8080/
. - Assume you would like access all repositories via a corporate proxy, except certain repositories located at http://abc.com which needs to be accessed directly without going through a proxy.
- To achieve this, create a
.gitconfig
file at~/
such that~/.gitconfig
file contains the following.[user] email = name@email.com name = name [http] proxy = http://10.0.0.0:8080/ [https] proxy = https://10.0.0.0:8080/ [http "http://abc.com/"] proxy =
Leave a comment