Skip to content

Commit 2be7828

Browse files
authored
Merge pull request #150 from ChaithanyaGK/remote_push
Push a new local branch to remote and track
2 parents 6e9713b + 33dc777 commit 2be7828

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
164164
* [List all git aliases](#list-all-git-aliases)
165165
* [Show git status short](#show-git-status-short)
166166
* [Checkout a commit prior to a day ago](#checkout-a-commit-prior-to-a-day-ago)
167+
* [Push a new local branch to remote repository and track](#push-a-new-local-branch-to-remote-repository-and-track)
167168

168169
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
169170
<!-- @doxie.inject end toc -->
@@ -1156,5 +1157,10 @@ git status --short --branch
11561157
git checkout master@{yesterday}
11571158
```
11581159
1160+
## Push a new local branch to remote repository and track
1161+
```sh
1162+
git push -u origin <branch_name>
1163+
```
1164+
11591165
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
11601166
<!-- @doxie.inject end -->

tips.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,5 +488,8 @@
488488
{
489489
"title": "Checkout a commit prior to a day ago",
490490
"tip": "git checkout master@{yesterday}"
491-
}
491+
}, {
492+
"title": "Push a new local branch to remote repository and track",
493+
"tip": "git push -u origin <branch_name>"
494+
}
492495
]

0 commit comments

Comments
 (0)