git command
-
Common GIT powershell command line Staging Git add filename Git status Commit Git commit –m “add link to …..” (shortcut: git command –am “fsdfsd”) New repo Git init (in folder, run this, create new repo) Git add –A (add all files to repo) Git rm –cached .\index.html (exclude file) Git status Branch git branch (get all branch) Git branch testing (create testing branch) Switching branches Git checkout testing Git checkout master (master is the default one) Merge Git checkout master Git merge bar (conflict) Delete hotfix branch Git branch –d hotfix Rebase Git rebase Remote repo: git init --bare \dongjie\rnd\INDA_GIT\test
Git remote add origin //dongjie/rnd/INDA_GIT/test (add remote repo) Git remote -v (list remote repo) Git push -u origin --all (put to remote repo origin) git clone \dongjie\rnd\INDA_GIT\test\ (clone from remote share folder to local) git pull origin (pull update from remote source origin, if you want to do merge, please do this before and merge) -
Initial a new project: git init --bare “\dongjie\DEPT\INDA\Dongjie RMS\project1\project1.git”
git clone //dongjie/rnd/INDA_GIT/test/test.gif f:\test
Git add -A
Git commit -m “add link to …..”
Git push -u origin --all
- Webstorm integration with GIT Reference: https://www.jetbrains.com/webstorm/help/adding-files-to-a-local-git-repository.html
Check out from Version ControlGIT
- Get version history Getk –all or use GIT GUI interface