diff --git a/builtin/push.c b/builtin/push.c index ba2bd56ebc..2d84d10720 100644 --- a/builtin/push.c +++ b/builtin/push.c @@ -199,7 +199,7 @@ static void setup_default_push_refspecs(struct remote *remote) branch = branch_get(NULL); if (!branch) die(_(message_detached_head_die), remote->name); - add_refspec("HEAD"); + add_refspec(branch->name); break; case PUSH_DEFAULT_NOTHING: