appwiki:git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
appwiki:git [2024/04/11 08:15] yingappwiki:git [2024/05/08 03:06] – [Git as cmd] ying
Line 4: Line 4:
     * https://git-scm.com/download/win     * https://git-scm.com/download/win
     * 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://desktop.github.com/
 +  * other
 +    * https://www.gitkraken.com/
 +    * https://www.sourcetreeapp.com/
 +    * https://www.sublimemerge.com/
 +  * vs code related
 +    * https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph
  
 ====== Command Git cmds ====== ====== Command Git cmds ======
Line 61: Line 72:
 </code> </code>
   * create branch for a feature or a issue <code dos>git branch export-feature</code>   * create branch for a feature or a issue <code dos>git branch export-feature</code>
 +  * switch branch <code dos>git checkout export-feature</code>
 +  * push to remote repo <code dos>git push -u origin export-feature</code>
 +  * merge a feature branch into main <code dos>git checkout main
 +git merge export-feature
 +</code>
 +  * to check which feature branch has been merged into main before, checkout to main, then <code dos>git branch --merge</code>
 +    * to check which feature branch has NOT been merged into main, <code dos>git branch --no-merged</code>
 +    * 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</code>
     * 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, it will pop up the {} dictionary part for you to edit <code>"git.path": "D:\\App_Dev\\PortableGit\\bin\\git.exe",</code>     * go File > Preference > setting , search git path, click edit setting.json, it will pop up the {} dictionary part for you to edit <code>"git.path": "D:\\App_Dev\\PortableGit\\bin\\git.exe",</code>
   * 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
  • appwiki/git.txt
  • Last modified: 2024/05/08 06:01
  • by ying