Created
November 22, 2011 17:40
-
-
Save ctrueden/1386332 to your computer and use it in GitHub Desktop.
Can "git rebase --onto" move commits to another branch?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: curtis@rook ~/code/LOCI/scifio (develop) | |
git st | |
# On branch develop | |
nothing to commit (working directory clean) | |
: curtis@rook ~/code/LOCI/scifio (develop) | |
echo hello >> pom.xml | |
: curtis@rook ~/code/LOCI/scifio (develop) | |
git st | |
# On branch develop | |
# Changes not staged for commit: | |
# (use "git add <file>..." to update what will be committed) | |
# (use "git checkout -- <file>..." to discard changes in working directory) | |
# | |
# modified: pom.xml | |
# | |
no changes added to commit (use "git add" and/or "git commit -a") | |
: curtis@rook ~/code/LOCI/scifio (develop) | |
git ci -a -m "Quick test" | |
[develop 9875540] Quick test | |
1 files changed, 1 insertions(+), 0 deletions(-) | |
: curtis@rook ~/code/LOCI/scifio (develop) | |
git rebase --onto test-branch HEAD^ | |
fatal: Needed a single revision | |
Does not point to a valid commit: | |
: curtis@rook ~/code/LOCI/scifio (develop) | |
git branch test-branch | |
: curtis@rook ~/code/LOCI/scifio (develop) | |
git rebase --onto test-branch HEAD^ | |
First, rewinding head to replay your work on top of it... | |
Fast-forwarded develop to test-branch. | |
: curtis@rook ~/code/LOCI/scifio (develop) | |
git log -1 | |
commit 9875540f1eb02423f9728810315658123ef3fd2d | |
Author: Curtis Rueden <[email protected]> | |
Date: Tue Nov 22 11:39:35 2011 -0600 | |
Quick test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment