Last active
December 22, 2016 14:56
-
-
Save in8finity/99c046ba36768e04b8aca9faba2a64a5 to your computer and use it in GitHub Desktop.
Bash script to find diffs only in files from your feature between stage with multiple features
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
STAGING_BRANCH=staging | |
DEVELOP_BRANCH=develop | |
BRANCH_NAME=`git branch --list | fzf` | |
COMMON_PARENT_COMMIT_HASH=`git merge-base $BRANCH_NAME $DEVELOP_BRANCH` | |
comm -12 <(git diff $BRANCH_NAME staging --name-only) <(git diff $COMMON_PARENT_COMMIT_HASH $BRANCH_NAME --name-only) \ | |
| xargs -I{} git diff staging $BRANCH_NAME -- {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment