Merge pull request #150 from ChaithanyaGK/remote_push

Push a new local branch to remote and track
This commit is contained in:
hemanth.hm 2017-08-09 22:56:02 +05:30 committed by GitHub
commit 2be7828ce5
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>"
}
]