Need Assistance?

support@tutorialshub.in

Professional GitHub Projects

Keeping a fork synchronized

ADVERTISEMENT
GitHub Free Lesson
5 min read
ADVERTISEMENT

Why synchronization matters

A contribution branch should normally be based on a reasonably current upstream state. This reduces conflicts and makes maintainers more likely to review a clean change.

Fetch before rebasing

Fetching updates the local remote-tracking references without changing your working branch. Inspect the incoming history and then rebase or merge according to the project's contribution policy.

Force push after a rebase carefully

If you rewrite your own contribution branch, use --force-with-lease rather than an unconditional force push.

ADVERTISEMENT