Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
appwiki:git [2024/04/11 08:15] – ying | appwiki:git [2024/05/08 06:01] (current) – [Git tool] ying | ||
---|---|---|---|
Line 4: | Line 4: | ||
* https:// | * https:// | ||
* you can download the portable version without mess up your own current system config | * you can download the portable version without mess up your own current system config | ||
+ | |||
+ | ====== Git tool ====== | ||
+ | |||
+ | * git desktop from github | ||
+ | * https:// | ||
+ | * other | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * vs code related | ||
+ | * https:// | ||
+ | * view graph tree and difference in commits | ||
+ | * https:// | ||
+ | * (visual view not free) gitLens — Git supercharged (from gitkraken) | ||
+ | |||
====== Command Git cmds ====== | ====== Command Git cmds ====== | ||
Line 61: | Line 76: | ||
</ | </ | ||
* create branch for a feature or a issue <code dos>git branch export-feature</ | * create branch for a feature or a issue <code dos>git branch export-feature</ | ||
+ | * switch branch <code dos>git checkout export-feature</ | ||
+ | * push to remote repo <code dos>git push -u origin export-feature</ | ||
+ | * merge a feature branch into main <code dos>git checkout main | ||
+ | git merge export-feature | ||
+ | </ | ||
+ | * to check which feature branch has been merged into main before, checkout to main, then <code dos>git branch --merge</ | ||
+ | * to check which feature branch has NOT been merged into main, <code dos>git branch --no-merged</ | ||
+ | * for already merged branch shows in --merge cmd, you can safely delete those feature branch, as they are already part of main. | ||
Extra Tips: | Extra Tips: | ||
- | * you can use vscode to open the folder project (the one with .git hidden folder), vscode will auto know it is a git project and it has some built-in tool to help you instead of using the git cmd | + | * you can use vscode to open the folder project (the one with .git hidden folder), vscode will auto know it is a git project and it has some built-in tool to help you instead of using the git cmd <code dos>git branch -d export-feature</ |
* you may need to set git.exe path if you use above portable one, | * you may need to set git.exe path if you use above portable one, | ||
* go File > Preference > setting , search git path, click edit setting.json, | * go File > Preference > setting , search git path, click edit setting.json, | ||
* if you want more help, you can use Github Desktop app, which you dont have to use their github service, you can use add your local disk project folder, you can manage all the git cmd in a visual way, like compare difference and make commit | * if you want more help, you can use Github Desktop app, which you dont have to use their github service, you can use add your local disk project folder, you can manage all the git cmd in a visual way, like compare difference and make commit |