Configuration
1 | git config --global --edit |
1 | git config --global --list |
Branches
List out all branches:1 | git branch -a |
1 | git branch mynewbranch |
1 | git checkout mynewbranch |
1 | git branch -m mynewbranch newbranch |
1 | git branch -d newbranch |
Specific branch
git clone a specific branch instead of all the branches and checkout specific one. For example, in my private repo I want to clone the "forth-branch" only, then write:1 | git clone --single-branch --branch forth-branch https://github.com/machingclee/2020-English-Learning-Website.git |
P4Merge Configuration
1 2 3 4 5 6 | git config --global merge.tool p4merge git config --global mergetool.p4merge.path "C:/Program Files/Perforce/p4merge.exe" git config --global mergetool.prompt false git config --global diff.tool p4merge git config --global difftool.p4merge.path "C:/Program Files/Perforce/p4merge.exe" git config --global difftool.prompt false |
git config --global --list
to double check the configuration:
1 2 3 4 5 6 7 8 9 10 | core.editor="C:\Users\Ching-Cheong Lee\AppData\Local\Programs\Microsoft VS Code\Code.exe" --wait user.name=James Lee user.email=machingclee@gmail.com color.ui=true merge.tool=p4merge mergetool.p4merge.path=C:/Program Files/Perforce/p4merge.exe mergetool.prompt=false diff.tool=p4merge difftool.p4merge.path=C:/Program Files/Perforce/p4merge.exe difftool.prompt=false |
No comments:
Post a Comment