Created
August 9, 2016 21:01
-
-
Save kenny-evitt/6b6eeedc817356cc2321138988c9e54d to your computer and use it in GitHub Desktop.
Bash shell function that can be defined at a command line
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
# Enter the following line at a Bash command prompt | |
stage_ours () { git checkout --ours "$1" && git add "$1"; } | |
# Note that the trailing `;` above is required for function definitions on a single line. | |
# See [Bash Reference Manual - Shell Functions](https://www.gnu.org/software/bash/manual/bash.html#Shell-Functions) for more info. | |
# Run the function like `stage_ours Stored\ Procedures/dbo.Batch_Detail_GL_Journal_Export_bak.sql` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment