https://github.com/ehanley324/layout-instability/blob/master/explainer.md
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 | |
| git add -A . | |
| git commit --amend --no-edit |
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 | |
| # Sqash all commits in upstream..HEAD to a single commit. | |
| ONTO=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null) | |
| if [ -n "$ONTO" ]; then | |
| BEHIND=$(git rev-list --left-right --count $ONTO...@ | cut -f1) | |
| if [ $BEHIND != "0" ]; then | |
| echo "$ONTO: behind $BEHIND" | |
| ONTO= |