Skip to content

Instantly share code, notes, and snippets.

View vikytech's full-sized avatar
😎
Be You.

Vikhyath Choradia vikytech

😎
Be You.
View GitHub Profile
@vikytech
vikytech / commit-msg
Last active January 16, 2018 12:19
Git commit message hook
#!/usr/bin/env ruby
$regex = /\A(\[(\w+)(\/(\w*))?(\/(\w*))?\])\s+(\[#\w{2,10}\])\s+(.*)$/i
message_file = ARGV[0]
message = File.read(message_file)
def red_background(text);"\e[41m#{text}\e[0m";end
# enforced short and crisp commit message
if message.length > 150
@vikytech
vikytech / .gitconfig
Last active July 29, 2025 11:01
Common git alias
[init]
defaultBranch = main
[core]
autocrlf = input
[alias]
st = status
ca = commit -am
co = checkout
ci = commit -m
br = branch