The content of this article is targeted at such people
--Using gibo
(software that creates .gitignore
)
--Using pyenv
(software that manages multiple environments and multiple versions of Python)
--I have a Git repository in a Python environment
--Until now, you had to manually add .python-version
to .gitignore
.
Someone (mainly me)
I think many people use pyenv when managing multiple environments and multiple versions of Python.
To tell pyenv which Python environment to use in that directory, use a file called .python-version
(the pyenv local
command creates this).
For this reason, I've ever used to generate a .gitignore
that excludes environment-dependent .python-versions from Git repositories.
$ gibo Python > .gitignore
$ echo '.python-version' >> .gitignore
And so on.
However, around January 28, 2016, a pull request that also ignores .python-version
was merged into github / gitignore (referenced by gibo). ..
https://github.com/github/gitignore/pull/1801 https://github.com/github/gitignore/commit/76b87217c836fa814e22763dc6b12b09ab86513a
thanks to,
$ gibo Python > .gitignore
It's just now.
Of course, the gitignore boilerplate referenced by gibo
must be updated to the one after the commit was merged.
$ gibo --update
Can be updated with.
Recommended Posts