Git Fork synchronization workflow¶
The Git fork synchronization workflow is a procedure used to update a local or remote fork repository with changes from the original upstream source. This ensures that a fork remains current with the main project's development history^[600-developer-tools-git-git-upstream.md].
Workflow Steps¶
The process relies on designating the original repository as the "upstream" remote and fetching changes from it, distinguishing it from the developer's own "origin" repository^[600-developer-tools-git-git-upstream.md].
1. Add Upstream Remote¶
First, the original repository URL must be added as a remote named upstream^[600-developer-tools-git-git-upstream.md].
git remote add upstream https://github.com/yudady/intellij-sdk-docs.git
2. Update Origin (Optional)¶
The workflow may involve verifying or updating the origin URL to point to the user's fork^[600-developer-tools-git-git-upstream.md].
git remote set-url origin https://github.com/yudady/intellij-sdk-docs.git
3. Verify Remotes¶
List all configured remotes to ensure the upstream and origin URLs are correct^[600-developer-tools-git-git-upstream.md].
git remote -v
4. Pull Changes¶
Finally, pull the updates from the upstream repository to synchronize the local branch^[600-developer-tools-git-git-upstream.md].
git pull upstream
Sources¶
600-developer-tools-git-git-upstream.md