...menustart
- github
- run html on github
- merge specific commit
- show file change of a commit
- get a file with specific revision
- git show/diff 乱码问题
- [trick] use git log to display the diffs while searching
- show files changed between 2 commit
- provide username when clone private repos
- gitlab: git clone leads to "SSL certificate problem: unable to get local issuer certificate"
- Calling git clone using password with special character
- Copy branch from another repository
- delete a branch locally and remotely
- ignore system proxy setting
- git set v2ray proxy
- delete all commit history in github
...menuend
- visit
http://rawgit.com/ - 输入你需要执行的 html 网页,会给出两个链接
- https://rawgit.com/mebusy/html5_examples/master/XXXX.html
- url for production
- https://cdn.rawgit.com/mebusy/html5_examples/master/XXXX.html
- url for dev/testing
- https://rawgit.com/mebusy/html5_examples/master/XXXX.html
- 注意: cdn.rawgit.com 上的文件,第一次访问后会被 永久cache,从而导致 拉取不到最新的文件。
- 所以一般访问的时候,会指定 某个 commit hash , 或使用最新的 HEAD
https://cdn.rawgit.com/mebusy/html5_examples/a12340a5d32b0c760ef138301b067fb1153ef94b/00_marchingSquare.html- or
https://cdn.rawgit.com/mebusy/html5_examples/HEAD/00_marchingSquare.html
git cherry-pick [-n] <commit>
-nmeansno commit
git diff-tree <commit>
git show REVISION:filePath > outFilePath
git diff | less -r
-rmeansOutput "raw" control characters.
git log -p -- path/to/file
git diff commit1 commit2 --name-onlygit clone https://username:password@github.com/username/repository.git
git config --global http.sslVerify false
git clone ...
git config --global http.sslVerify true
! # $ & ' ( ) * + , / : ; = ? @ [ ]
%21 %23 %24 %26 %27 %28 %29 %2A %2B %2C %2F %3A %3B %3D %3F %40 %5B %5D
- for example
$ git clone https://myuser:password%21@github.com/myuser/repo.git
- git clone your repo , so your repo's repo is named
origin - add another remote repo , give it name
html5git remote add html5 ...
- fetch remote repo data
git fetch html5
- checkout 1 branch
html5/develop, to your local branchdevelopgit checkout -b develop html5/develop
- push you local branch
developtoorigingit push --set-upstream origin develop
$ git push --delete <remote_name> <branch_name>
$ git branch -d <branch_name>
git config --global --add remote.origin.proxy ""
# http协议,8001端口修改成自己的本地代理端口
git config --global http.https://github.com.proxy https://127.0.0.1:8001
git config --global https.https://github.com.proxy https://127.0.0.1:8001- Checkout
git checkout --orphan latest_branch
- Add all the files
git add -A
- Commit the changes
git commit -am "commit message"
- Delete the branch
git branch -D master
- Rename the current branch to master
git branch -m master
- Finally, force update your repository
git push -f origin master