Timeline for How to reproduce `git push -u` behavior, that is, auto-set local branch as the new remote or push branch?
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 17, 2019 at 22:08 | comment | added | 9000 |
Indeed, doing Pp and replying "origin" (or whatever other remote name) works as desired! It does not set the branch for Pu , though, so following pushes need to be Pp s, too.
|
|
Jul 17, 2019 at 22:07 | vote | accept | 9000 | ||
May 3, 2019 at 19:04 | comment | added | tarsius |
These commands prompt for a remote, not a branch. The push-remote is a remote. It can be configured per-branch using branch.<branch>.pushRemote or for all branches using remote.pushDefault . Git enforces that the "push remote branch" always has the same name as the local branch, you cannot use another name. If you have a single remote, then you can just accept the default using RET , otherwise you have to select a remove.
|
|
May 3, 2019 at 18:22 | comment | added | 9000 |
It's good to know! But I still cannot have my current local branch name automatically inserted into the Pp list or into the bC list, or any auto-completions therein. I have to manually copy-paste it. What I want to avoid is the copy-pasting.
|
|
May 3, 2019 at 18:02 | history | edited | tarsius | CC BY-SA 4.0 |
added 1 character in body
|
May 3, 2019 at 17:55 | history | answered | tarsius | CC BY-SA 4.0 |