Notes
Search…
Rebase

Rebasing a fork

1
# Add the remote, call it "upstream":
2
3
git remote add upstream https://github.com/whoever/whatever.git
4
5
# Fetch all the branches of that remote into remote-tracking branches,
6
# such as upstream/master:
7
8
git fetch upstream
9
10
# Make sure that you're on your master branch:
11
12
git checkout master
13
14
# Rewrite your master branch so that any commits of yours that
15
# aren't already in upstream/master are replayed on top of that
16
# other branch:
17
18
git rebase upstream/master
Copied!
Copy link