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

Add pyenv to gitignore #986

Closed
wants to merge 1 commit into from
Closed

Add pyenv to gitignore #986

wants to merge 1 commit into from

Conversation

aaditkamat
Copy link

I have started using pyenv to create and manage Python virtual environments. I noticed that there is no config for pyenv within the current gitignore so I thought I would add it.

@scorphus
Copy link
Collaborator

Everything that is not specific and directly related to the project should be kept in a separate, global ignore file, e.g. $HOME/.config/git/ignore. See man gitignore | grep -A5 'all situations':

   o   Patterns which a user wants Git to ignore in all situations (e.g.,
       backup or temporary files generated by the user's editor of choice)
       generally go into a file specified by core.excludesFile in the
       user's ~/.gitconfig. Its default value is
       $XDG_CONFIG_HOME/git/ignore. If $XDG_CONFIG_HOME is either not set
       or empty, $HOME/.config/git/ignore is used instead.

@scorphus scorphus closed this Oct 21, 2019
@aaditkamat
Copy link
Author

This is a project specific configuration though

@scorphus
Copy link
Collaborator

No. This is actually related to Python development in general, not to this specific project. If most of your Python projects have a .python-version entry in .gitignore, that entry should be global instead. Also, other developers might prefer to use another entirely different tool to manage their virtual environments, in which case that entry won't make any sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants