fork-dev / Tracker

Bug and issue tracker for Fork for Mac
507 stars 12 forks source link

[Feature request] Ignore git hooks #948

Open defusioner opened 4 years ago

defusioner commented 4 years ago

Hello, First of all, much appreciate your work, please stay cool as you are!

I did not find a feature request/idea template so here is a a markup of a story, correct me if I write something ugly.

Description

Be able to ignore commit hooks when commit/push.

DanPristupov commented 4 years ago

You can skip pre-commit hook when it fails.

Screenshot 2020-03-25 at 19 11 22
defusioner commented 4 years ago

@DanPristupov Right, seen that already. But you can't skip before pushing!

DanPristupov commented 4 years ago

Right, you can not.

This is a rarely used feature, I think we don't need a UI for it. However you can try to create a custom command to push without hook.

defusioner commented 4 years ago

Hehe, I have an Idea and they let me skipping hooks. Useful when pushing some css/gitlab-ci/other non-essential stuff to unit-testing

DanPristupov commented 4 years ago
Screenshot 2020-03-25 at 19 31 35

This is a bit inflexible though:

brechtm commented 1 year ago

It doesn't seem possible to skip pre-commit hooks. The window that pops up when the hook fails only has a Close button.

I don't think this one can be handled by means of a custom command because the commit message needs to be passed.

tsa96 commented 1 year ago

I constantly make little commits I intend to fixup into existing commits as I work, not being able to do within Fork is really annoying. This isn't a hack to avoid hooks entirely - I do linting etc. once I've finished the rebase, and it's something I do deliberately to keep my branch clean. Currently have a script for just toggling hooks completely, but would be great if there was some option in the UI, even if it's hidden away somewhere.

Edit: Adding a custom command in Fork works reasonably well for commit hooks, as shown ("disable" version substitutes .husky with /dev/null): disablehooks

chimit commented 1 year ago

Skipping pre-commit hooks checkbox would be handy. Some other git clients have it which is very convenient when you make small granular commits and don't want your entire testing to be run every time (which usually takes 10-20 seconds in my case).

JoernBerkefeld commented 1 month ago

i second this request! i created hooks on merge, commit and checkout to ensure my team executes certain checks or installs dependencies automatically. when creating a new release though, this is becoming really annoying because some of these hooks take a long time to execute and if you have to switch branches a couple times I literally had time to google this issue ticket and write this comment....

having an option somewhere that I can use would be great. i do agree that a directly visible checkbox is not necessarily the greatest idea, given that it would lead to people using that all the time, making the hooks useless. but maybe hidden in the right click menus?

JoernBerkefeld commented 1 month ago

played around with custom commands and the main issue I have is that - at least so far - I haven't figured out how to add a custom commit command that picks the commit subject and description from the standard input fields. i suppose the easiest approach would be to either allow custom commands to show up in the commit / commit & push drop down AND to add variables that contain the content of those 2 fields .... or to directly add a 3rd command there that does this.

for now I have to resort to the CLI for the actual commit which is annoying at best.