1. Clone one branch or one tag only
lake@localhost:~/git_repository$ git clone -b v1.8.3.1 --depth 1 https://github.com/git/git.git
lake@localhost:~/git_repository/git-v1.8.33$ git logall
* 362de91 (grafted, HEAD, tag: v1.8.3.1) Git 1.8.3.1
for local git reposity
git clone -b Listview --depth 2 --no-local ../L7-gui-optimization
2. Try all remote tags in local clone
git ls-remote --tags
3. alias
[alias]
logall = log --graph --pretty=oneline --all --abbrev-commit --decorate
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
4. Set/Unset http proxy
lake@localhost:~/Google$ git config --global https.proxy "10.24.1.1:8080"
lake@localhost:~/Google$ git config --global http.proxy "10.24.1.1:8080"
lake@localhost:~/Google$ git clone https://android.googlesource.com/platform/external/chromium-webview
Cloning into 'chromium-webview'...
remote: Sending approximately 4.85 GiB ...
remote: Counting objects: 359, done
Receiving objects: 82% (735/894), 98.60 MiB | 196.00 KiB/s
### Cancel git/http proxy
git config --global --unset http.proxy
git config --global --unset https.proxy
5. rename a branch
git branch -m oldbranchname newbranchname