Git Tool #
git-secrets #
git-secrets
scans a git repository, finds credential information and prevents them from being committed.
References #
Install #
macOS
$ brew install git-secrets
$ git clone https://github.com/awslabs/git-secrets.git
$ cd git-secrets
$ make install
Basic usage #
Set git-secrets to a git repository
$ git init
$ git secrets --install
Check commit history
$ git secrets --scan-history
For AWS
$ git secrets --register-aws
git-split-diffs #
- Display the results of the
git diff
command side by side like GitHub.
References #
Precondition #
npm
oryarn
Install #
If you use npm
$ npm install -g git-split-diffs
or, if you use yarn
$ yarn global add git-split-diffs
Add configuration of git-split-diffs to .gitconfig #
$ git config --global core.pager "git-split-diffs --color | less -RFX"
Check #
$ git log -p
$ git diff <branch A> <branch B>
Additional info #
If you want to use light theme
$ git config --global split-diffs.theme-name light
If you want to use dark theme
$ git config --global split-diffs.theme-name dark
Adjust the minimum display width if you want to display the difference side by side even if the terminal display is narrow.
$ git config --global split-diffs.min-line-width 40