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 @@ -171,6 +171,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
171171* [ List all git aliases] ( #list-all-git-aliases )
172172* [ Show git status short] ( #show-git-status-short )
173173* [ Checkout a commit prior to a day ago] ( #checkout-a-commit-prior-to-a-day-ago )
174+ * [ Push the current branch to the same name on the remote repository] ( #push-the-current-branch-to-the-same-name-on-the-remote-repository )
174175* [ Push a new local branch to remote repository and track] ( #push-a-new-local-branch-to-remote-repository-and-track )
175176* [ Change a branch base] ( #change-a-branch-base )
176177* [ Use SSH instead of HTTPs for remotes] ( #use-ssh-instead-of-https-for-remotes )
@@ -1223,6 +1224,11 @@ git status --short --branch
12231224git checkout master@{yesterday}
12241225```
12251226
1227+ ## Push the current branch to the same name on the remote repository
1228+ ```sh
1229+ git push origin HEAD
1230+ ```
1231+
12261232## Push a new local branch to remote repository and track
12271233```sh
12281234git push -u origin <branch_name>
Original file line number Diff line number Diff line change 511511 "title" : " Checkout a commit prior to a day ago" ,
512512 "tip" : " git checkout master@{yesterday}"
513513 }, {
514+ "title" : " Push the current branch to the same name on the remote repository" ,
515+ "tip" : " git push origin HEAD"
516+ }, {
514517 "title" : " Push a new local branch to remote repository and track" ,
515518 "tip" : " git push -u origin <branch_name>"
516519 }, {
You can’t perform that action at this time.
0 commit comments