Skip to content

A set of scripts that solved the annoying issue in PyCharm that git-hooks are not run in the currently selected environment. Hack only works for Conda environments, but can easily be extended. See https://youtrack.jetbrains.com/issue/PY-12988.

License

sveinugu/pycharm_githooks_workaround

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyCharm / Conda / git-hooks workaround

Workaround to get PyCharm to run git-hooks within the same Conda environment that is selected the PyCharm project.

Only activates the Conda environment if PyCharm runs a git command that might be connected to a git-hook. This speeds up common PyCharm git command significantly.

Requirements:

  • Platform: MacOS (but the scripts might work with some modifications also on other platforms).
  • Shell: bash
  • miniconda (v3) installed using Homebrew (recommended approach to combining Homebrew and Conda)
  • Python v2 or v3

Setup:

PyCharm->Preferences->Version Control->git->Path to git executable: Select git_wrapper.sh. Can be set up globally (for all projects).

About

A set of scripts that solved the annoying issue in PyCharm that git-hooks are not run in the currently selected environment. Hack only works for Conda environments, but can easily be extended. See https://youtrack.jetbrains.com/issue/PY-12988.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published