This file contains hidden or 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 | |
| main() { | |
| init | |
| # Check that we're not committing directly into the default branch by mistake. | |
| check_branch | |
| # Get the list of staged files once, to save invoking the same command over and over again. | |
| get_staged_files | |
| # Check for "don't commit" comments. |
This file contains hidden or 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 | |
| # Inspired by http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/ | |
| # Author: Jonathan Fischer | |
| # Define some colors first: | |
| black='\x1b[0;30m'; red='\x1b[0;31m'; green='\x1b[0;32m'; yellow='\x1b[0;33m'; blue='\x1b[0;34m'; pink='\x1b[0;35m'; cyan='\x1b[0;36m'; grey='\x1b[0;37m'; | |
| BLACK='\x1b[1;30m'; RED='\x1b[1;31m'; GREEN='\x1b[1;32m'; YELLOW='\x1b[1;33m'; BLUE='\x1b[1;34m'; PINK='\x1b[1;35m'; CYAN='\x1b[1;36m'; WHITE='\x1b[1;37m' | |
| NC='\x1b[0m' # No Color |