Git · Middle · Question 32 of 75

How do you keep your fork in sync with the original repository?

Explanation

git remote add upstream <url>, then git fetch upstream and git rebase upstream/main. Platforms also offer a "Sync fork" button for the default branch.

Further reading

Problem with a question

Git · Middle · question 32

Test yourself

Take the Git · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz