forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Rebasing Git for Windows
nalla edited this page Mar 30, 2015
·
11 revisions
To do a rebase of the Git for Windows source onto a new upstream Git release, follow this guideline.
- You want to rebase onto a new upstream release tagged as
v2.3.4
- The latest rebase was done onto a upstream release tagged as
v2.3.3
- A working Git for Windows SDK.
- A fetched build-extra repository.
cd /usr/src/build-extra
git fetch
git checkout master
- Working directory set to current Git for Windows source.
cd /usr/src/git
- Added upstream as a remote.
git remote add git https://github.com/git/git
git fetch git
- Find the commit of the last rebase and remember it.
BASE="$(git rev-parse ":/Start the merging-rebase")"
- Run the
shears.sh
script to build up the actual rebase script.
../build-extra/./shears.sh --merging --onto v2.3.4 $BASE
Note:v2.3.4
is atag
in the remotegit
. - The rebase should start automatically and occasionally stop if it hits any merge conflicts. Resolve those conflicts and then continue the rebase.
git rebase --continue
-
Generate a diff of the previous state.
git diff v2.3.3..origin/master > prev.diff
-
Generate a diff of the current state.
git diff v2.3.4..master > curr.diff
-
Diff the diffs.
git diff --no-index prev.diff curr.diff
Ideally, the resulting output will show changes only in the
@@
lines ofprev.diff
vscurr.diff
.
It's a bit hard to read, though, because it is a diff of a diff.
So meta.
When there is a line that starts with a-
or a+
but then continues with a space, that's good!
It means that the context of our changes changed.
This is the Git for Windows wiki. See how-to-participate.