Push a new local branch to remote and track

This commit is contained in:
Chaithanya Ganta 2017-08-08 15:41:23 +05:30
parent 6e9713be4a
commit 33dc77736c
2 changed files with 10 additions and 1 deletions

View File

@ -164,6 +164,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
* [List all git aliases](#list-all-git-aliases)
* [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)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
@ -1156,5 +1157,10 @@ git status --short --branch
git checkout master@{yesterday}
```
## Push a new local branch to remote repository and track
```sh
git push -u origin <branch_name>
```
<!-- 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

@ -488,5 +488,8 @@
{
"title": "Checkout a commit prior to a day ago",
"tip": "git checkout master@{yesterday}"
}
}, {
"title": "Push a new local branch to remote repository and track",
"tip": "git push -u origin <branch_name>"
}
]