0

I'd like to migrate husky from v4 to v6. As it says in the installation guide:

Another case you may be in is if your package.json file and .git directory are not at the same level. [...]
By design, husky install must be run in the same directory as .git

So the problem is that in .NET Core solution I'm working on there's no .git folder anywhere to be found. I'm using Visual Studio 2019 and all the git settings are available through the IDE.

Have anyone had this kind of problem or succeeded with husky v6 installation in similar circumstances?

I think that maybe it is possible to create .git directory in the solution's Web project and link it to the actual git settings location but I can't find anywhere where to find it.

Thanks in advance.

  • Visual Studio also creates `.git` folder in the root of the solution. Did you try to [show hidden files](https://www.technipages.com/show-hidden-files-windows)? – prinkpan Jun 23 '21 at 15:24
  • Yes @PriyankPanchal, you are right. After actually locating .git directory in the solution's root I followed husky's custom directory guide and Git hooks gets installed. Thank you for help. – pskwirowski Jun 23 '21 at 15:46

1 Answers1

0

Your .git folder is probably hidden. There is no way for your VS git commands to work and not have a local .git folder in your repo folder.

Ε Г И І И О
  • 11,199
  • 1
  • 48
  • 63