File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff 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
12131214git 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
12181224git push -u origin <branch_name>
Original file line number Diff line number Diff line change 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 }, {
You can’t perform that action at this time.
0 commit comments