Skip to content

Instantly share code, notes, and snippets.

@kenny-evitt
Created August 9, 2016 21:01
Show Gist options
  • Save kenny-evitt/6b6eeedc817356cc2321138988c9e54d to your computer and use it in GitHub Desktop.
Save kenny-evitt/6b6eeedc817356cc2321138988c9e54d to your computer and use it in GitHub Desktop.
Bash shell function that can be defined at a command line
# 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