Skip to content

Commit

Permalink
Use git push -u origin HEAD instead of figuring out the current branch
Browse files Browse the repository at this point in the history
This, because finding the current branch is more difficult than necessary.
https://stackoverflow.com/questions/14031970/git-push-current-branch-shortcut
  • Loading branch information
terhechte committed Mar 1, 2020
1 parent fddfdc2 commit 5cfe446
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.c
Expand Up @@ -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");
Expand Down

0 comments on commit 5cfe446

Please sign in to comment.