git在開發中的一些使用

git 獲取遠程分支:git

步驟以下:fetch

首先:git fetch --allit

其次:git checkout 分支名ast

例如:git checkout pmt-45424-TOUCHWEB備份

這樣就能夠獲取到須要的分支了遠程

 

刪除本地分支:push

git branch -D <BranchName>tag

 

git將代碼從一個環境提交到另外一個環境(例如從fp環境到stage):分支

首先: git pull --rebase git-branch pmt-xxx 備份: git fetch git-branch pmt-xxx:pmt-xxx-bak 更新 :git pull --rebase origin master 最後 :git push -f git-branch pmt-xxx

相關文章
相關標籤/搜索