Skip to content

Nagarian/dotnethooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DotnetHooks

This project has only one goal, execute the following command: git config core.hooksPath hooks when the restore command is executed. In that's way you could enforce policy on you project when executing basic Git command.

For more information about git hooks please read this article

Installation

In order to use this package you will only need to install this package from command line :

dotnet add package DotnetHooks

After this you can customize the path of the hooks folder by specifing HooksPath variable. By default it's set to hooks which means the folder will be relative to the .git folder. For example :

- .git
- hooks/
  - commit-msg
- src/
  - MyProject/
    - MyProject.csproj
  - MyProject.sln
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <HooksPath>custom_hooks</HooksPath>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="DotnetHooks" Version="1.0.0" IncludeAssets="build" />
  </ItemGroup>

</Project>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published