Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c8eb026

Browse files
Add a tip to omit writing branch names when push
1 parent 1a97486 commit c8eb026

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

‎README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
170170
* [List all git aliases](#list-all-git-aliases)
171171
* [Show git status short](#show-git-status-short)
172172
* [Checkout a commit prior to a day ago](#checkout-a-commit-prior-to-a-day-ago)
173+
* [Push the current branch to the same name on the remote repository](#push-the-current-branch-to-the-same-name-on-the-remote-repository)
173174
* [Push a new local branch to remote repository and track](#push-a-new-local-branch-to-remote-repository-and-track)
174175
* [Change a branch base](#change-a-branch-base)
175176
* [Use SSH instead of HTTPs for remotes](#use-ssh-instead-of-https-for-remotes)
@@ -1213,6 +1214,11 @@ git status --short --branch
12131214
git checkout master@{yesterday}
12141215
```
12151216
1217+
## Push the current branch to the same name on the remote repository
1218+
```sh
1219+
git push origin HEAD
1220+
```
1221+
12161222
## Push a new local branch to remote repository and track
12171223
```sh
12181224
git push -u origin <branch_name>

‎tips.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,9 @@
508508
"title": "Checkout a commit prior to a day ago",
509509
"tip": "git checkout master@{yesterday}"
510510
}, {
511+
"title": "Push the current branch to the same name on the remote repository",
512+
"tip": "git push origin HEAD"
513+
}, {
511514
"title": "Push a new local branch to remote repository and track",
512515
"tip": "git push -u origin <branch_name>"
513516
}, {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /