Skip to content

Instantly share code, notes, and snippets.

View umutcnkus's full-sized avatar

Umutcan Kuş umutcnkus

  • 19:32 (UTC +03:00)
View GitHub Profile

Automatically Prepend a Jira Issue ID to Git Commit Messages

Use a git hook to match a Jira issue ID from the current branch, and prepend it to every commit message

Assuming the current branch contains a Jira issue ID, you can use a git hook script to prepend it to every commit message.

  1. Create an empty commit-msg git hook file, and make it executable. From your project's root directory:

     install -b -m 755 /dev/null .git/hooks/commit-msg
    
  2. Save the following script to the newly-created .git/hooks/commit-msg file:

CSS units

Recommendations of unit types per media type:

Media Recommended Occasional use Infrequent use Not recommended
Screen em, rem, % px ch, ex, vw, vh, vmin, vmax cm, mm, in, pt, pc
Print em, rem, % cm, mm, in, pt, pc ch, ex px, vw, vh, vmin, vmax

Relative units

Relative units

function out = optimal_hj(initial_point, step_size, tolerance)
global Kp Ki size reference_points
point = initial_point;
reference_points = [point];
values = [f(point,2)];
flag = 0;
size = step_size;
value_tolerance = 0.001;
dummy_array = [f(initial_point,2)]
while(size > tolerance)