Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new repo with git using "main" in global config results in no branches #8689

Closed
4 tasks done
rmflight opened this issue Jan 6, 2021 · 3 comments
Closed
4 tasks done
Labels
bug stale Issues which have been closed automatically due to inactivitiy. vcs Version control such as git and svn/subversion

Comments

@rmflight
Copy link

rmflight commented Jan 6, 2021

System details

RStudio Edition : Desktop
RStudio Version : 1.4.1102
OS Version      : Ubuntu 20.04 (PopOS flavor)
R Version       : 4.0.0

Steps to reproduce the problem

  • Configure a recent version of git (v 2.28+) to use a default branch name other than "master"
    • git config --global init.defaultBranch main
  • Set up a new project with git CVS in the RStudio menu
  • Navigate to git pane, no branches are available (see screenshot)
  • In a brand new directory with no git run git init to verify that git itself is working properly and sets up a "main" branch

Screenshot from 2021-01-06 13-17-46

Installing Up-to-date Git version

add-apt-repository ppa:git-core/ppa
apt update
apt install git

Describe the problem in detail

If you set the default branch name to be something other than master on the a newer version of git (v 2.28 or newer), then when RStudio sets up a new project directory with git CVS, there are no branches available.

Describe the behavior you expected

I expect the git repo to be present with a "main" branch to commit to.

  • 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.
@rmflight
Copy link
Author

rmflight commented Jan 6, 2021

I will note that it doesn't keep one from committing using the git pane, and as soon as a commit is made, the display updates to the "main" branch. So I'm not sure how much of an actual "issue" it is, except that I expected to see a branch name there, and I'm pretty sure when it was "master" it showed up find the first time.

@gtritchie gtritchie added the vcs Version control such as git and svn/subversion label Jan 6, 2021
@ronblum ronblum added the bug label Jan 7, 2021
@github-actions
Copy link

github-actions bot commented Jul 7, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.

@github-actions github-actions bot added the stale Issues which have been closed automatically due to inactivitiy. label Jul 7, 2021
@github-actions
Copy link

This issue has been automatically closed due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stale Issues which have been closed automatically due to inactivitiy. vcs Version control such as git and svn/subversion
Projects
None yet
Development

No branches or pull requests

3 participants