Skip to content

Instantly share code, notes, and snippets.

View samuelsolis's full-sized avatar

Samuel samuelsolis

View GitHub Profile
@pcambra
pcambra / gist:fefed7ebfa14c0a2602bc4cd7688928c
Created October 18, 2018 07:19
Reinstal module configuration for Drupal 8
drush php-eval "\Drupal::service('config.installer')->installDefaultConfig('module', 'module_name');"
@samuelsolis
samuelsolis / git alias
Last active August 4, 2017 11:50
Git alias
git config --global alias.st status
git config --global alias.logf 'log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat'
git config --global alias.ld 'log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative'
git config --global alias.logv 'log --graph --full-history --all --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"'
git config --global alias.logb 'log --graph --full-history --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"'
@bartoszmajsak
bartoszmajsak / prepare-commit-msg.sh
Last active March 20, 2024 08:12
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"