Skip to content

Instantly share code, notes, and snippets.

View apostololeg's full-sized avatar
🦉
d–_–b

Oleg Apostol apostololeg

🦉
d–_–b
View GitHub Profile
@apostololeg
apostololeg / eslint-changed.sh
Last active July 4, 2018 12:26 — forked from kentcdodds/eslint-changed.sh
Shell script to lint only changed files to be used as a githook (specific to my project)
#!/usr/bin/env bash
set -e
NM_BIN=./node_modules/.bin
echo "Linting changed files"
SRC_FILES=$(git diff --staged --diff-filter=ACMTUXB --name-only -- '*.js' | grep -v '\.test\|mock\|e2e\.js$') && x=1
function lint() {
if [ "$2" ]; then
#!/bin/bash
gpg --version # Check GPG installation
git --version # Check Git installation
git-secret --version # Check git-secret installation
gpg --list-keys # Make sure that your GPG key is listed here
git init # Initialize the repository if you have not done it already
git secret init # Initialize the repository using git-secret
git secret tell email@example.com # Add a user