ITeye博客

git command

maxer025 · 2019-04-22 17:20 · git command · 非技术 · Markdown

  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

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

  1. Get version history Getk –all or use GIT GUI interface

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。