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
#!/usr/bin/env bash | |
# This script stashes the currently staged changes, and leaves everything else in the working directory as-is. | |
# (source: https://stackoverflow.com/questions/14759748/stashing-only-staged-changes-in-git-is-it-possible/39644782#39644782) | |
# Prompt for the desired repo path | |
REPOPATH= | |
read -p "Enter the repo path, or press ENTER for current dir: " REPOPATH | |
# Read the desired stash description from the command line, or prompt the user for it if necessary |
NewerOlder