Guest User

Untitled

a guest
Feb 23rd, 2018
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. For global settings.
  2.  
  3. ```
  4. git config --global --edit
  5. ```
  6.  
  7. For local settings for individual projects.
  8.  
  9. ```
  10. git config --local --edit
  11. ```
  12.  
  13. one-liner to edit user and email
  14.  
  15. ```
  16. git config --local user.name "NoSkillGuy" && git config --local user.email "NoSkillGuy@gmail.com"
  17. ```
  18.  
  19.  
  20. Other options available
  21. ```
  22. usage: git config [<options>]
  23.  
  24. Config file location
  25. --global use global config file
  26. --system use system config file
  27. --local use repository config file
  28. -f, --file <file> use given config file
  29. --blob <blob-id> read config from given blob object
  30.  
  31. Action
  32. --get get value: name [value-regex]
  33. --get-all get all values: key [value-regex]
  34. --get-regexp get values for regexp: name-regex [value-regex]
  35. --get-urlmatch get value specific for the URL: section[.var] URL
  36. --replace-all replace all matching variables: name value [value_regex]
  37. --add add a new variable: name value
  38. --unset remove a variable: name [value-regex]
  39. --unset-all remove all matches: name [value-regex]
  40. --rename-section rename section: old-name new-name
  41. --remove-section remove a section: name
  42. -l, --list list all
  43. -e, --edit open an editor
  44. --get-color find the color configured: slot [default]
  45. --get-colorbool find the color setting: slot [stdout-is-tty]
  46.  
  47. Type
  48. --bool value is "true" or "false"
  49. --int value is decimal number
  50. --bool-or-int value is --bool or --int
  51. --path value is a path (file or directory name)
  52.  
  53. Other
  54. -z, --null terminate values with NUL byte
  55. --name-only show variable names only
  56. --includes respect include directives on lookup
  57. --show-origin show origin of config (file, standard input, blob, command line)
  58. ```
Add Comment
Please, Sign In to add comment