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

Avoiding committing unwanted files with use_git() #378

Closed
karawoo opened this Issue May 31, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@karawoo

karawoo commented May 31, 2018

I love that use_git() automatically puts .Rhistory, .RData, and .Rproj.user in .gitignore. Because it automatically commits everything else I often end up with other unwanted files in my git history, such as the ever-irritating .DS_Store. Would it be possible to gitignore this file by default as well (though that's potentially confusing for non-Mac users), or maybe for the user to have more control over what gets added to the initial commit?

@jennybc

This comment has been minimized.

Show comment
Hide comment
@jennybc

jennybc May 31, 2018

Member

I think the traditional way for Mac users to prevent the .DS_Store problem is to list that in a user-level global gitignore file (I know I do).

But perhaps use_git() should be reigned in somehow, yes. I have also found it overzealous at times.

Member

jennybc commented May 31, 2018

I think the traditional way for Mac users to prevent the .DS_Store problem is to list that in a user-level global gitignore file (I know I do).

But perhaps use_git() should be reigned in somehow, yes. I have also found it overzealous at times.

@jennybc

This comment has been minimized.

Show comment
Hide comment
@jennybc

jennybc May 31, 2018

Member

Proposal:

  • If not interactive, continue to commit all files.
  • If interactive, ask user to choose:
    • Stage & commit all of <THESE FILES> with <THIS MESSAGE>?
    • Don't make an initial commit.

@hadley do you have an opinion?

Member

jennybc commented May 31, 2018

Proposal:

  • If not interactive, continue to commit all files.
  • If interactive, ask user to choose:
    • Stage & commit all of <THESE FILES> with <THIS MESSAGE>?
    • Don't make an initial commit.

@hadley do you have an opinion?

@karawoo

This comment has been minimized.

Show comment
Hide comment
@karawoo

karawoo May 31, 2018

I like this. When I use use_git() I always expect it to do just the git init part and forget that it does the commit too, so it would be nice to have that as an option.

karawoo commented May 31, 2018

I like this. When I use use_git() I always expect it to do just the git init part and forget that it does the commit too, so it would be nice to have that as an option.

@hadley

This comment has been minimized.

Show comment
Hide comment
@hadley

hadley Jun 1, 2018

Member

I like your proposed interactive option

Member

hadley commented Jun 1, 2018

I like your proposed interactive option

@jennybc jennybc added the feature label Jun 1, 2018

@jennybc jennybc added this to the v1.4.0 milestone Jun 1, 2018

jennybc added a commit that referenced this issue Jun 1, 2018

Rein in use_git(); don't make initial commit without consent
Fixes #378 Avoiding committing unwanted files with use_git()

jennybc added a commit that referenced this issue Jun 1, 2018

Rein in use_git(); don't make initial commit without consent
Fixes #378 Avoiding committing unwanted files with use_git()

@jennybc jennybc closed this in #381 Jun 1, 2018

jennybc added a commit that referenced this issue Jun 1, 2018

Rein in use_git(); don't make initial commit without consent (#381)
Fixes #378 Avoiding committing unwanted files with use_git()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment