mirror of
https://github.com/git-tips/tips.git
synced 2024-09-21 00:01:03 +02:00
Merge pull request #150 from ChaithanyaGK/remote_push
Push a new local branch to remote and track
This commit is contained in:
commit
2be7828ce5
|
@ -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)
|
* [List all git aliases](#list-all-git-aliases)
|
||||||
* [Show git status short](#show-git-status-short)
|
* [Show git status short](#show-git-status-short)
|
||||||
* [Checkout a commit prior to a day ago](#checkout-a-commit-prior-to-a-day-ago)
|
* [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)
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||||
<!-- @doxie.inject end toc -->
|
<!-- @doxie.inject end toc -->
|
||||||
|
@ -1156,5 +1157,10 @@ git status --short --branch
|
||||||
git checkout master@{yesterday}
|
git checkout master@{yesterday}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Push a new local branch to remote repository and track
|
||||||
|
```sh
|
||||||
|
git push -u origin <branch_name>
|
||||||
|
```
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||||
<!-- @doxie.inject end -->
|
<!-- @doxie.inject end -->
|
||||||
|
|
|
@ -488,5 +488,8 @@
|
||||||
{
|
{
|
||||||
"title": "Checkout a commit prior to a day ago",
|
"title": "Checkout a commit prior to a day ago",
|
||||||
"tip": "git checkout master@{yesterday}"
|
"tip": "git checkout master@{yesterday}"
|
||||||
}
|
}, {
|
||||||
|
"title": "Push a new local branch to remote repository and track",
|
||||||
|
"tip": "git push -u origin <branch_name>"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user