Skip to content

Git push greyed out #8136

Open
Open

Description

@csgillespie

System details

RStudio Edition : Desktop
RStudio Version :  1.4.904
OS Version      : 20.04
R Version       : 4.0.2

Steps to reproduce the problem

Assuming you have a GitHub repo. In the terminal

  1. git config --global push.default current
  2. git checkout -b test
  3. touch tmp.txt && git add tmp.txt && git commit -m "Test"
  4. Pushing from the IDE is not possible, but git push is fine

Describe the problem in detail

See above

Describe the behavior you expected

Being able to push

  • I have read the guide for submitting good bug reports.
  • I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting a RStudio crash, I have included a diagnostics report.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

Activity

  1. kevinushey commented on Oct 21, 2020

    @kevinushey
    Collaborator

    Does it work after restarting RStudio?

  2. csgillespie commented on Oct 21, 2020

    @csgillespie
    ContributorAuthor
  3. ronblum commented on Oct 22, 2020

    @ronblum
    Contributor

    I can reproduce this on MacOS 11 Big Sur beta 10 with RStudio Desktop 1.4.940. Switching to a different branch in the IDE, such as master or creating a new branch, works fine. It's only when creating the branch outside of RStudio that the buttons are grayed out.

  4. added
    vcs
    on Oct 22, 2020
  5. kevinushey commented on Oct 22, 2020

    @kevinushey
    Collaborator

    Simpler reprex:

    cd /tmp
    git clone https://github.com/kevinushey/skeleton
    cd skeleton
    git checkout -b test-branch
    open skeleton.Rproj
    

    The problem is that the branch does not yet have a configured upstream:

    $ /usr/local/bin/git rev-parse --abbrev-ref @{upstream}
    fatal: no upstream configured for branch 'test-branch'
    

    and so RStudio uses that as a signal that pushing and pulling is not possible, even though a plain git push does indeed work.

  6. kevinushey commented on Oct 22, 2020

    @kevinushey
    Collaborator

    It might be better to just always enable the Push + Pull buttons, and then propagate the error (if any) if attempts to push or pull fail.

  7. added this to the v1.5 milestone on Oct 22, 2020
  8. kevinushey commented on Oct 22, 2020

    @kevinushey
    Collaborator

    The workaround is to explicitly set the remote; a simple way is to just use git push -u to set upstream and push.

  9. modified the milestones: v1.5, Later on Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugvcs

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions