From 5cfe44696a8b1eb16592d9088fe2498702ead2cc Mon Sep 17 00:00:00 2001 From: Benedikt Terhechte Date: Sun, 1 Mar 2020 17:32:10 +0100 Subject: [PATCH] Use git push -u origin HEAD instead of figuring out the current branch This, because finding the current branch is more difficult than necessary. https://stackoverflow.com/questions/14031970/git-push-current-branch-shortcut --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 9e3a2a2..92cd365 100644 --- a/src/main.c +++ b/src/main.c @@ -944,7 +944,7 @@ void gitsi_perform_push(gitsi_context *context) { /* perform a git push -u */ void gitsi_perform_pushu(gitsi_context *context) { char *buffer; - asprintf(&buffer, "/bin/sh -c \"cd '%s' && git push -u\"", context->repo_dir); + asprintf(&buffer, "/bin/sh -c \"cd '%s' && git push -u origin HEAD\"", context->repo_dir); gitsi_curses_stop(false); system("clear");