從其他 collaborators 那裡 pull 修改,確保檔案是最新的版本。

從 Remote pull 到本地

若是和別人一起合作,就會需要把檔案保持在最新狀態,以免修改到相同的檔案造成版本衝突。因此,你就會需要時常 pull 其他人對程式所作的修改。

A diagram shows a computer pulling information down from a repository's website

Reporobot 都做了些什麼呢?

把 GitHub 上 'origin' remote 的更新 pull 到你的電腦上,來看 Reporobot 是否有在 'add-' branch 做了任何修改:

git pull

如果沒有任何修改,Git 會告訴你 'Already up-to-date'。若有修改的話,Git 會把那些修改 merge 到電腦裡哦。

Reporobot 有修改嗎?Git 會告訴你那些地方有變化。可以打開修改過的檔案看看,Reporobot 修改了什麼。哇!Reporobot 真是個藝術家呀!

Please select your repository directory.
  • 檢查 Git 狀態
  • git status
  • 從遠端分支 pull 更新回來
  • git pull
  • 在收取更新前先檢查 remote 是否有變動
  • git fetch --dry-run