Syncing forks Github

Samuel Martín

By default, if you are using git you should know that you have the alias origin, which means your repository’s url, if more people are working in your project/fork probably you are using 'git pull origin/master' or just 'git pull' to get the new changes in your remote repository in your local machine. Now you will also need another one, I will name it ‘upstream’ following the main convention, but you can name it as you prefer.

git remote -v

origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)

origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)

git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git

git fetch upstream

 

git checkout master

git merge upstream/master

Syncing forks Github

By samuelmartin1988

Syncing forks Github

  • 862