Tuesday, March 29, 2016

Git fork sync

Git command to fork sync:

1. git fetch upstream
2. git merge upstream / branch_name
3. git push origin branch_name [optional, if you want to update your account remote]

Note : if you did not add upstream as remote then add by below command:
git remote add upstream(remote_name remote_url

Basic :  if you don't know, which one is origin and which one is upstream then read below:

After forking repo, that repo will come to your account and that is ORIGIN and UPSTREAM is which you have forked from. Like:

Another account / repo (upstream) => forked => your account / forked repo (origin)

No comments:

Post a Comment

Workflow of WordPress project in a team with Git

1. We should not push any Wordpress core folders or files to github. 2. Only push custom theme and custom plugin into github. 3. So, in this...