Skip to content

Collaborating to open source projects? Here you find instructions how to sync your fork repository!

License

Notifications You must be signed in to change notification settings

improvess/how-to-sync-fork-repo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

How to sync your fork repository?

Collaborating to open source projects? Here you will find instructions how to sync your fork repository!

How to sync you fork repository - shortest explanation possible

$ git clone https://github.com/your_account/yor_fork.git

$ cd yor_fork

$ git remote add upstream https://github.com/repo_owner/source_repo.git

$ git fetch upstream

$ git checkout main # or git checkout master

$ git merge upstream/main # or git merge upstream/master

$ git push origin main # or git push origin master

master or main branch name should I use?

In old times, the github default branch name were master. Nowadays, the default name is main instead. So, for old repos use master and for newest ones use main (or any different name the repository owner have choosen for it).

It is pretty easy to realize which branch name you should use. Check this saetting on the repository main page. For example, in Primefaces repository page you should see master as repository name:

In a new repository such as V3DLib you should find main as default branch name:

About

Collaborating to open source projects? Here you find instructions how to sync your fork repository!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published