Skip to content

Add change a branch base tips #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2018
Merged

Add change a branch base tips #160

merged 1 commit into from
Mar 22, 2018

Conversation

lmarvaud
Copy link
Contributor

@lmarvaud lmarvaud commented Mar 21, 2018

Based on : https://stackoverflow.com/questions/10853935/change-branch-base

Tested on git version 2.11.0 (Apple Git-81) :

$ git --version
git version 2.11.0 (Apple Git-81)
$ git log --oneline | cat
f494716 Commit to merge
297dd99 Commit not to merge
d3bd657 Initial commit
$ git rebase --onto master dev
First, rewinding head to replay your work on top of it...
Applying: Commit to merge
$ git log --oneline | cat
ef49494 Commit to merge
4c3a806 Commit on master
d3bd657 Initial commit

Based on : https://stackoverflow.com/questions/10853935/change-branch-base

Tested on `git version 2.11.0 (Apple Git-81)` :
```bash-4.3$ git --version
git version 2.11.0 (Apple Git-81)
bash-4.3$ git checkout -b test-rebase-onto
Switched to a new branch 'test-rebase-onto'
bash-4.3$ touch "test-to-rebase"
bash-4.3$ git add test-to-rebase
bash-4.3$ git commit -m "Commit to rebase"
[test-rebase-onto 11d1cdd] Commit to rebase
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 test-to-rebase
bash-4.3$ git log
bash-4.3$ git rebase --onto master dev
Applying: Commit to rebase
bash-4.3$ git log```
@hemanth hemanth merged commit b773c7a into git-tips:master Mar 22, 2018
blanjatest2 pushed a commit to blanjatest2/tips that referenced this pull request Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants