Skip to content

Instantly share code, notes, and snippets.

@gcollic
Last active February 15, 2023 10:03
Show Gist options
  • Save gcollic/f6f093ec3805979669d0bf744e22c72a to your computer and use it in GitHub Desktop.
Save gcollic/f6f093ec3805979669d0bf744e22c72a to your computer and use it in GitHub Desktop.
Replace the path to git by the path of this file in order to stop IntelliJ from messing with your staging area (no config for rename & co).
#!/bin/bash
inner() {
local cmd="$@"
local REGEX="(^|log.showSignature=false )(add|rm|mv) "
if [[ $cmd =~ $REGEX ]]; then
echo 'Stopping IntelliJ from being a not well-behaved git client. See IDEA-194592, IDEA-63391, IDEA-176961, ...' >&2
return 1
fi
git "$@"
}
inner "$@"
@gcollic
Copy link
Author

gcollic commented Apr 21, 2020

👍 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment