Git pull from someone else’s fork

Add a new remote (say, other) in your own repo. Pull other/<branch> changes into your local branch (say, add-other-changes). Push to your own forked repo (origin/add-other-changes). Now, when’re you done with add-other-changes branch, create a Pull request & merge it with origin/master.

  • Pull other repo’s changes into your own repo:

      # go into your own repo
      $ git remote add other <other-student-repo-url>  # add a new remote with other's repo URL
    
      $ git fetch other         # sync/update local with other's repo
    
      $ git checkout -b add-other-changes       # create a new branch named 'add-other-changes'                    
      $ git pull other <specific-branch-name>   # pull other/<branch> changes           
    
      $ git push origin HEAD    # push changes to your own(origin) forked repo `add-other-changes` branch
    

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)