Advertisement
Lio-code

Git it

Mar 4th, 2020
603
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.38 KB | None | 0 0
  1. wilder@wilder-ThinkPad-T440p:~$ git config --global user .emailgit config --global user.email "lio4455@hotmail.com"
  2. usage: git config [<options>]
  3.  
  4. Config file location
  5. --global use global config file
  6. --system use system config file
  7. --local use repository config file
  8. -f, --file <file> use given config file
  9. --blob <blob-id> read config from given blob object
  10.  
  11. Action
  12. --get get value: name [value-regex]
  13. --get-all get all values: key [value-regex]
  14. --get-regexp get values for regexp: name-regex [value-regex]
  15. --get-urlmatch get value specific for the URL: section[.var] URL
  16. --replace-all replace all matching variables: name value [value_regex]
  17. --add add a new variable: name value
  18. --unset remove a variable: name [value-regex]
  19. --unset-all remove all matches: name [value-regex]
  20. --rename-section rename section: old-name new-name
  21. --remove-section remove a section: name
  22. -l, --list list all
  23. -e, --edit open an editor
  24. --get-color find the color configured: slot [default]
  25. --get-colorbool find the color setting: slot [stdout-is-tty]
  26.  
  27. Type
  28. --bool value is "true" or "false"
  29. --int value is decimal number
  30. --bool-or-int value is --bool or --int
  31. --path value is a path (file or directory name)
  32. --expiry-date value is an expiry date
  33.  
  34. Other
  35. -z, --null terminate values with NUL byte
  36. --name-only show variable names only
  37. --includes respect include directives on lookup
  38. --show-origin show origin of config (file, standard input, blob, command line)
  39.  
  40. wilder@wilder-ThinkPad-T440p:~$ git config --global user.lio4455@hotmail.com
  41. wilder@wilder-ThinkPad-T440p:~$ git config --global user.lio4455@hotmail.com
  42. wilder@wilder-ThinkPad-T440p:~$ git config --global user.name lio-code
  43. wilder@wilder-ThinkPad-T440p:~$ git config --global user.name Lio-code
  44. wilder@wilder-ThinkPad-T440p:~$ git config --global user.lio4455@hotmail.com
  45. wilder@wilder-ThinkPad-T440p:~$ git config --global user.name "Lio-code"
  46. wilder@wilder-ThinkPad-T440p:~$ git config --global user.email "lio4455@hotmail.com"
  47. wilder@wilder-ThinkPad-T440p:~$ pwd
  48. /home/wilder
  49. wilder@wilder-ThinkPad-T440p:~$ mkdir hello-world
  50. wilder@wilder-ThinkPad-T440p:~$ cd hello-world
  51. wilder@wilder-ThinkPad-T440p:~/hello-world$ git init
  52. Initialized empty Git repository in /home/wilder/hello-world/.git/
  53. wilder@wilder-ThinkPad-T440p:~/hello-world$ git status
  54. On branch master
  55.  
  56. No commits yet
  57.  
  58. nothing to commit (create/copy files and use "git add" to track)
  59. wilder@wilder-ThinkPad-T440p:~/hello-world$ mkdir mondossier
  60. wilder@wilder-ThinkPad-T440p:~/hello-world$ cd ..
  61. wilder@wilder-ThinkPad-T440p:~$ rm -rf mondossier
  62. wilder@wilder-ThinkPad-T440p:~$ cd hello-world
  63. wilder@wilder-ThinkPad-T440p:~/hello-world$ rm -rf mondossier
  64. wilder@wilder-ThinkPad-T440p:~/hello-world$ git-status
  65. git-status: command not found
  66. wilder@wilder-ThinkPad-T440p:~/hello-world$ git status
  67. On branch master
  68.  
  69. No commits yet
  70.  
  71. Untracked files:
  72. (use "git add <file>..." to include in what will be committed)
  73.  
  74. readme
  75.  
  76. nothing added to commit but untracked files present (use "git add" to track)
  77. wilder@wilder-ThinkPad-T440p:~/hello-world$ git add readme.txt
  78. fatal: pathspec 'readme.txt' did not match any files
  79. wilder@wilder-ThinkPad-T440p:~/hello-world$ git add readme.txt
  80. wilder@wilder-ThinkPad-T440p:~/hello-world$ git commit -m "création du fichier readme"
  81. [master (root-commit) cfb8deb] création du fichier readme
  82. 1 file changed, 1 insertion(+)
  83. create mode 100644 readme.txt
  84. wilder@wilder-ThinkPad-T440p:~/hello-world$ nano readme.txt
  85. wilder@wilder-ThinkPad-T440p:~/hello-world$ git diff
  86. diff --git a/readme.txt b/readme.txt
  87. index 632e4fe..f392008 100644
  88. --- a/readme.txt
  89. +++ b/readme.txt
  90. @@ -1 +1,2 @@
  91. Bonjour
  92. +ça va
  93. wilder@wilder-ThinkPad-T440p:~/hello-world$ git config --global user.username Lio-code
  94. wilder@wilder-ThinkPad-T440p:~/hello-world$ git config --global user.username
  95. Lio-code
  96. wilder@wilder-ThinkPad-T440p:~/hello-world$ VERIFY
  97. VERIFY: command not found
  98. wilder@wilder-ThinkPad-T440p:~/hello-world$ git config --global user.username
  99. Lio-code
  100. wilder@wilder-ThinkPad-T440p:~/hello-world$ VERIFY
  101. VERIFY: command not found
  102. wilder@wilder-ThinkPad-T440p:~/hello-world$ git config --global user.username
  103. Lio-code
  104. wilder@wilder-ThinkPad-T440p:~/hello-world$ git remote add origin https://github.com/Lio-code/hello-world.git
  105. wilder@wilder-ThinkPad-T440p:~/hello-world$ git push origin master
  106. Username for 'https://github.com': Lio-code
  107. Password for 'https://Lio-code@github.com':
  108. remote: Invalid username or password.
  109. fatal: Authentication failed for 'https://github.com/Lio-code/hello-world.git/'
  110. wilder@wilder-ThinkPad-T440p:~/hello-world$ git push origin master
  111. Username for 'https://github.com': Lio-code
  112. Password for 'https://Lio-code@github.com':
  113. Counting objects: 3, done.
  114. Writing objects: 100% (3/3), 233 bytes | 233.00 KiB/s, done.
  115. Total 3 (delta 0), reused 0 (delta 0)
  116. To https://github.com/Lio-code/hello-world.git
  117. * [new branch] master -> master
  118. wilder@wilder-ThinkPad-T440p:~/hello-world$ cd ..
  119. wilder@wilder-ThinkPad-T440p:~$ git clone https://github.com/Lio-code/patchworkCloning into 'patchwork'...
  120. remote: Enumerating objects: 37, done.
  121. remote: Counting objects: 100% (37/37), done.
  122. remote: Compressing objects: 100% (29/29), done.
  123. remote: Total 364586 (delta 20), reused 12 (delta 6), pack-reused 364549
  124. Receiving objects: 100% (364586/364586), 136.43 MiB | 4.99 MiB/s, done.
  125. Resolving deltas: 100% (172134/172134), done.
  126. wilder@wilder-ThinkPad-T440p:~$ cd patchwork
  127. wilder@wilder-ThinkPad-T440p:~/patchwork$ git remote -v
  128. origin https://github.com/Lio-code/patchwork (fetch)
  129. origin https://github.com/Lio-code/patchwork (push)
  130. wilder@wilder-ThinkPad-T440p:~/patchwork$ git remote add upstream https://github.com/jlord/patchwork.git
  131. wilder@wilder-ThinkPad-T440p:~/patchwork$ git remote -v
  132. origin https://github.com/Lio-code/patchwork (fetch)
  133. origin https://github.com/Lio-code/patchwork (push)
  134. upstream https://github.com/jlord/patchwork.git (fetch)
  135. upstream https://github.com/jlord/patchwork.git (push)
  136. wilder@wilder-ThinkPad-T440p:~/patchwork$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement