Merge pull request #160 from lmarvaud/patch-1

Add change a branch base tips
This commit is contained in:
hemanth.hm 2018-03-22 08:47:40 +05:30 committed by GitHub
commit b773c7ab67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -166,6 +166,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
* [Show git status short](#show-git-status-short)
* [Checkout a commit prior to a day ago](#checkout-a-commit-prior-to-a-day-ago)
* [Push a new local branch to remote repository and track](#push-a-new-local-branch-to-remote-repository-and-track)
* [Change a branch base](#change-a-branch-base)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
@ -1167,5 +1168,10 @@ git checkout master@{yesterday}
git push -u origin <branch_name>
```
## Change a branch base
```sh
git rebase --onto <new_base> <old_base>
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end -->

View File

@ -493,5 +493,9 @@
}, {
"title": "Push a new local branch to remote repository and track",
"tip": "git push -u origin <branch_name>"
}, {
"title": "Change a branch base",
"tip": "git rebase --onto <new_base> <old_base>"
}
]