久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      速查!Git常用命令大全【匯總推薦】

      git 常用命令

      1. 常用

      $ git remote add origin git@github.com:yeszao/dofiler.git         # 配置遠(yuǎn)程git版本庫 $ git pull origin master                                          # 下載代碼及快速合并  $ git push origin master                                          # 上傳代碼及快速合并 $ git fetch origin                                                # 從遠(yuǎn)程庫獲取代碼 $ git branch                                                      # 顯示所有分支 $ git checkout master                                             # 切換到master分支 $ git checkout -b dev                                             # 創(chuàng)建并切換到dev分支 $ git commit -m "first version"                                   # 提交 $ git status                                                      # 查看狀態(tài) $ git log                                                         # 查看提交歷史 $ git config --global core.editor vim                             # 設(shè)置默認(rèn)編輯器為vim(git默認(rèn)用nano) $ git config core.ignorecase false                                # 設(shè)置大小寫敏感 $ git config --global user.name "YOUR NAME"                       # 設(shè)置用戶名 $ git config --global user.email "YOUR EMAIL ADDRESS"             # 設(shè)置郵箱

      2. 別名 alias

      $ git config --global alias.br="branch"                 # 創(chuàng)建/查看本地分支 $ git config --global alias.co="checkout"               # 切換分支 $ git config --global alias.cb="checkout -b"            # 創(chuàng)建并切換到新分支 $ git config --global alias.cm="commit -m"              # 提交 $ git config --global alias.st="status"                 # 查看狀態(tài) $ git config --global alias.pullm="pull origin master"  # 拉取分支 $ git config --global alias.pushm="push origin master"  # 提交分支 $ git config --global alias.log="git log --oneline --graph --decorate --color=always" # 單行、分顏色顯示記錄 $ git config --global alias.logg="git log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative" # 復(fù)雜顯示

      3. 創(chuàng)建版本庫

      $ git clone <url>                 # 克隆遠(yuǎn)程版本庫 $ git init                        # 初始化本地版本庫

      4. 修改和提交

      $ git status                      # 查看狀態(tài) $ git diff                        # 查看變更內(nèi)容 $ git add .                       # 跟蹤所有改動過的文件 $ git add <file>                  # 跟蹤指定的文件 $ git mv <old> <new>              # 文件改名 $ git rm <file>                   # 刪除文件 $ git rm --cached <file>          # 停止跟蹤文件但不刪除 $ git commit -m “commit message”  # 提交所有更新過的文件 $ git commit --amend              # 修改最后一次提交

      5. 查看歷史

      $ git log                         # 查看提交歷史 $ git log -p <file>               # 查看指定文件的提交歷史 $ git blame <file>                # 以列表方式查看指定文件的提交歷史

      6. 撤銷

      $ git reset --hard HEAD           # 撤消工作目錄中所有未提交文件的修改內(nèi)容 $ git reset --hard <version>      # 撤銷到某個(gè)特定版本 $ git checkout HEAD <file>        # 撤消指定的未提交文件的修改內(nèi)容 $ git checkout -- <file>          # 同上一個(gè)命令 $ git revert <commit>             # 撤消指定的提交分支與標(biāo)簽

      7. 分支與標(biāo)簽

      $ git branch                      # 顯示所有本地分支 $ git checkout <branch/tag>       # 切換到指定分支或標(biāo)簽 $ git branch <new-branch>         # 創(chuàng)建新分支 $ git branch -d <branch>          # 刪除本地分支 $ git tag                         # 列出所有本地標(biāo)簽 $ git tag <tagname>               # 基于最新提交創(chuàng)建標(biāo)簽 $ git tag -a "v1.0" -m "一些說明"  # -a指定標(biāo)簽名稱,-m指定標(biāo)簽說明 $ git tag -d <tagname>            # 刪除標(biāo)簽 $ git checkout dev                # 合并特定的commit到dev分支上 $ git cherry-pick 62ecb3

      8. 合并與衍合

      $ git merge <branch>              # 合并指定分支到當(dāng)前分支 $ git merge --abort               # 取消當(dāng)前合并,重建合并前狀態(tài) $ git merge dev -Xtheirs          # 以合并dev分支到當(dāng)前分支,有沖突則以dev分支為準(zhǔn) $ git rebase <branch>             # 衍合指定分支到當(dāng)前分支

      9. 遠(yuǎn)程操作

      $ git remote -v                   # 查看遠(yuǎn)程版本庫信息 $ git remote show <remote>        # 查看指定遠(yuǎn)程版本庫信息 $ git remote add <remote> <url>   # 添加遠(yuǎn)程版本庫 $ git remote remove <remote>      # 刪除指定的遠(yuǎn)程版本庫 $ git fetch <remote>              # 從遠(yuǎn)程庫獲取代碼 $ git pull <remote> <branch>      # 下載代碼及快速合并 $ git push <remote> <branch>      # 上傳代碼及快速合并 $ git push <remote> :<branch/tag-name> # 刪除遠(yuǎn)程分支或標(biāo)簽 $ git push --tags                 # 上傳所有標(biāo)簽

      10. 打包

      $ git archive --format=zip --output ../file.zip master    # 將master分支打包成file.zip文件,保存在上一級目錄 $ git archive --format=zip --output ../v1.2.zip v1.2      # 打包v1.2標(biāo)簽的文件,保存在上一級目錄v1.2.zip文件中 $ git archive --format=zip v1.2 > ../v1.2.zip             # 作用同上一條命令

      11. 全局和局部配置

      全局配置保存在:$Home/.gitconfig 本地倉庫配置保存在:.git/config

      12. 遠(yuǎn)程與本地合并

      $ git init                              # 初始化本地代碼倉 $ git add .                             # 添加本地代碼 $ git commit -m "add local source"      # 提交本地代碼 $ git pull origin master                # 下載遠(yuǎn)程代碼 $ git merge master                      # 合并master分支 $ git push -u origin master             # 上傳代碼

      推薦:《Git使用教程》

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號