https://github.com/githubtraining/example-rebase--onto
A very simple repo to demonstrate rebasing with "rebase onto"
https://github.com/githubtraining/example-rebase--onto
Last synced: 8 months ago
JSON representation
A very simple repo to demonstrate rebasing with "rebase onto"
- Host: GitHub
- URL: https://github.com/githubtraining/example-rebase--onto
- Owner: githubtraining
- Archived: true
- Created: 2015-04-01T21:58:32.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-04-10T08:16:38.000Z (almost 7 years ago)
- Last Synced: 2025-03-14T07:21:22.348Z (10 months ago)
- Size: 246 KB
- Stars: 7
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rebase-example
A very simple repo to demonstrate rebasing with "rebase onto"
Showing how you can move one branch that was branched off incorrectly from another feature branch back onto master as its base.
### Steps Taken to Demonstrate
1. Branched the `feature-branch` branch (repetitive, I know) off of the master branch
2. Created a few commits on the `feature-branch`
3. Branched the `v1.0` branch from `feature-branch` (this would be an example of someone inadvertantly branching off of the wrong branch)
4. Added some commits to the `v1.0` branch.
5. Realized the `v1.0` branch was in the wrong location.
6. Removed it from the `feature-branch` by using the `git rebase --onto` command. This is the executed command:
- `git rebase --onto master feature-branch v1.0`
7. The commits on the v1.0 branch are not appended to the master branch
Branches Before the Rebase:

Branches After the Rebase:
