Skip to content

Instantly share code, notes, and snippets.

@socheatsok78
Last active January 28, 2019 08:44
Show Gist options
  • Save socheatsok78/f9a0be2b733f350370842474666ed9f2 to your computer and use it in GitHub Desktop.
Save socheatsok78/f9a0be2b733f350370842474666ed9f2 to your computer and use it in GitHub Desktop.
Git Alias
[alias]
ignore = "!gi() { curl -L -s https://www.gitignore.io/api/$@ ;}; gi"
accept-ours = "!f() { [ -z \"$@\" ] && set - '.'; git checkout --ours -- \"$@\"; git add -u -- \"$@\"; }; f"
accept-theirs = "!f() { [ -z \"$@\" ] && set - '.'; git checkout --theirs -- \"$@\"; git add -u -- \"$@\"; }; f"

Editing Git Configs

git config --global -e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment