`
maxer025
  • 浏览: 76458 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

git command

git 
阅读更多
1. 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)

2. 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   


3. Webstorm integration with GIT
Reference: https://www.jetbrains.com/webstorm/help/adding-files-to-a-local-git-repository.html

Check out from Version ControlGIT

4. Get version history
Getk –all   or use GIT GUI interface
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics