git 拉取和獲取 pull 和 fetch 區別【轉】


本文轉載自:http://blog.csdn.net/u010094934/article/details/52775653

使用git  直接提交的話   直接 push

獲取最新版本  有兩種  拉取 和 獲取 pull 和 fetch

 

git  pull     從遠程拉取最新版本 到本地  自動合並 merge            git pull origin master

git  fetch   從遠程獲取最新版本 到本地   不會自動合並 merge    git fetch  origin master       git log  -p master ../origin/master     git merge orgin/master

 

實際使用中  使用git fetch 更安全    在merge之前可以看清楚 更新情況  再決定是否合並

 

原文轉載自  http://www.tech126.com/git-fetch-pull/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM