Advertisement
Guest User

Untitled

a guest
Oct 16th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.91 KB | None | 0 0
  1. student@infpc-205:~$ git help
  2. usage: git [--version] [--help] [-C <path>] [-c name=value]
  3. [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
  4. [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
  5. [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
  6. <command> [<args>]
  7.  
  8. The most commonly used git commands are:
  9. add Add file contents to the index
  10. bisect Find by binary search the change that introduced a bug
  11. branch List, create, or delete branches
  12. checkout Checkout a branch or paths to the working tree
  13. clone Clone a repository into a new directory
  14. commit Record changes to the repository
  15. diff Show changes between commits, commit and working tree, etc
  16. fetch Download objects and refs from another repository
  17. grep Print lines matching a pattern
  18. init Create an empty Git repository or reinitialize an existing one
  19. log Show commit logs
  20. merge Join two or more development histories together
  21. mv Move or rename a file, a directory, or a symlink
  22. pull Fetch from and integrate with another repository or a local branch
  23. push Update remote refs along with associated objects
  24. rebase Forward-port local commits to the updated upstream head
  25. reset Reset current HEAD to the specified state
  26. rm Remove files from the working tree and from the index
  27. show Show various types of objects
  28. status Show the working tree status
  29. tag Create, list, delete or verify a tag object signed with GPG
  30.  
  31. 'git help -a' and 'git help -g' lists available subcommands and some
  32. concept guides. See 'git help <command>' or 'git help <concept>'
  33. to read about a specific subcommand or concept.
  34. student@infpc-205:~$
  35. student@infpc-205:~$ git help add
  36. student@infpc-205:~$
  37. student@infpc-205:~$ git config --global user.name "Valentyna Bahriy"
  38. student@infpc-205:~$ mkdir newrepo
  39. student@infpc-205:~$ cd newrepo
  40. student@infpc-205:~/newrepo$ git init
  41. Initialized empty Git repository in /home/student/newrepo/.git/
  42. student@infpc-205:~/newrepo$ cd
  43. student@infpc-205:~$ cd
  44. student@infpc-205:~$ mkdir pafnucy
  45. mkdir: nie można utworzyć katalogu „pafnucy”: Plik istnieje
  46. student@infpc-205:~$ cd newrepo
  47. student@infpc-205:~/newrepo$ git status
  48. On branch master
  49.  
  50. Initial commit
  51.  
  52. nothing to commit (create/copy files and use "git add" to track)
  53. student@infpc-205:~/newrepo$ git add PLIK
  54. fatal: pathspec 'PLIK' did not match any files
  55. student@infpc-205:~/newrepo$ git status
  56. On branch master
  57.  
  58. Initial commit
  59.  
  60. nothing to commit (create/copy files and use "git add" to track)
  61. student@infpc-205:~/newrepo$ touch plik
  62. student@infpc-205:~/newrepo$ git status
  63. On branch master
  64.  
  65. Initial commit
  66.  
  67. Untracked files:
  68. (use "git add <file>..." to include in what will be committed)
  69.  
  70. plik
  71.  
  72. nothing added to commit but untracked files present (use "git add" to track)
  73. student@infpc-205:~/newrepo$ git add plik
  74. student@infpc-205:~/newrepo$ git status
  75. On branch master
  76.  
  77. Initial commit
  78.  
  79. Changes to be committed:
  80. (use "git rm --cached <file>..." to unstage)
  81.  
  82. new file: plik
  83.  
  84. student@infpc-205:~/newrepo$ git commit -m "stworzenie pliku"
  85. [master (root-commit) bd95757] stworzenie pliku
  86. 1 file changed, 0 insertions(+), 0 deletions(-)
  87. create mode 100644 plik
  88. student@infpc-205:~/newrepo$ touch plik1
  89. student@infpc-205:~/newrepo$ git status
  90. On branch master
  91. Untracked files:
  92. (use "git add <file>..." to include in what will be committed)
  93.  
  94. plik1
  95.  
  96. nothing added to commit but untracked files present (use "git add" to track)
  97. student@infpc-205:~/newrepo$ git add plik1
  98. student@infpc-205:~/newrepo$ git status
  99. On branch master
  100. Changes to be committed:
  101. (use "git reset HEAD <file>..." to unstage)
  102.  
  103. new file: plik1
  104.  
  105. student@infpc-205:~/newrepo$ git status
  106. On branch master
  107. Changes to be committed:
  108. (use "git reset HEAD <file>..." to unstage)
  109.  
  110. new file: plik1
  111.  
  112. student@infpc-205:~/newrepo$ emacs plik
  113.  
  114. ** (emacs:1734): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
  115. student@infpc-205:~/newrepo$ touch drugi_plik
  116. student@infpc-205:~/newrepo$ git status
  117. On branch master
  118. Changes to be committed:
  119. (use "git reset HEAD <file>..." to unstage)
  120.  
  121. new file: plik1
  122.  
  123. Changes not staged for commit:
  124. (use "git add <file>..." to update what will be committed)
  125. (use "git checkout -- <file>..." to discard changes in working directory)
  126.  
  127. modified: plik
  128.  
  129. Untracked files:
  130. (use "git add <file>..." to include in what will be committed)
  131.  
  132. drugi_plik
  133.  
  134. student@infpc-205:~/newrepo$ git add drugi_plik
  135. student@infpc-205:~/newrepo$ git status
  136. On branch master
  137. Changes to be committed:
  138. (use "git reset HEAD <file>..." to unstage)
  139.  
  140. new file: drugi_plik
  141. new file: plik1
  142.  
  143. Changes not staged for commit:
  144. (use "git add <file>..." to update what will be committed)
  145. (use "git checkout -- <file>..." to discard changes in working directory)
  146.  
  147. modified: plik
  148.  
  149. student@infpc-205:~/newrepo$ git commit -m "zmiana i dodanie drugi_plik"
  150. [master 15d411d] zmiana i dodanie drugi_plik
  151. 2 files changed, 0 insertions(+), 0 deletions(-)
  152. create mode 100644 drugi_plik
  153. create mode 100644 plik1
  154. student@infpc-205:~/newrepo$ git status
  155. On branch master
  156. Changes not staged for commit:
  157. (use "git add <file>..." to update what will be committed)
  158. (use "git checkout -- <file>..." to discard changes in working directory)
  159.  
  160. modified: plik
  161.  
  162. no changes added to commit (use "git add" and/or "git commit -a")
  163. student@infpc-205:~/newrepo$ touch trzeci
  164. student@infpc-205:~/newrepo$ touch czwarty
  165. student@infpc-205:~/newrepo$ git add trzeci czwarty
  166. student@infpc-205:~/newrepo$ touch trzeci
  167. student@infpc-205:~/newrepo$ touch czwarty
  168. student@infpc-205:~/newrepo$ gir add --all
  169. bash: gir: nie znaleziono polecenia
  170. student@infpc-205:~/newrepo$ git add --all
  171. student@infpc-205:~/newrepo$ git status
  172. On branch master
  173. Changes to be committed:
  174. (use "git reset HEAD <file>..." to unstage)
  175.  
  176. new file: czwarty
  177. modified: plik
  178. new file: trzeci
  179.  
  180. student@infpc-205:~/newrepo$ ls
  181. drugi_plik plik plik1 trzeci
  182. student@infpc-205:~/newrepo$ rm trzeci
  183. student@infpc-205:~/newrepo$
  184. student@infpc-205:~/newrepo$ ls
  185. drugi_plik plik plik1
  186. student@infpc-205:~/newrepo$ git status
  187. On branch master
  188. Changes to be committed:
  189. (use "git reset HEAD <file>..." to unstage)
  190.  
  191. new file: czwarty
  192. modified: plik
  193. new file: trzeci
  194.  
  195. Changes not staged for commit:
  196. (use "git add/rm <file>..." to update what will be committed)
  197. (use "git checkout -- <file>..." to discard changes in working directory)
  198.  
  199. deleted: czwarty
  200. deleted: trzeci
  201.  
  202. student@infpc-205:~/newrepo$
  203. student@infpc-205:~/newrepo$ git rm czwarty
  204. rm 'czwarty'
  205. student@infpc-205:~/newrepo$ ls
  206. drugi_plik plik plik1
  207. student@infpc-205:~/newrepo$
  208. student@infpc-205:~/newrepo$ git status
  209. On branch master
  210. Changes to be committed:
  211. (use "git reset HEAD <file>..." to unstage)
  212.  
  213. modified: plik
  214. new file: trzeci
  215.  
  216. Changes not staged for commit:
  217. (use "git add/rm <file>..." to update what will be committed)
  218. (use "git checkout -- <file>..." to discard changes in working directory)
  219.  
  220. deleted: trzeci
  221.  
  222. student@infpc-205:~/newrepo$
  223. student@infpc-205:~/newrepo$ git commit -m 'a1'
  224. [master b095702] a1
  225. 2 files changed, 1 insertion(+)
  226. create mode 100644 trzeci
  227. student@infpc-205:~/newrepo$ git status
  228. On branch master
  229. Changes not staged for commit:
  230. (use "git add/rm <file>..." to update what will be committed)
  231. (use "git checkout -- <file>..." to discard changes in working directory)
  232.  
  233. deleted: trzeci
  234.  
  235. no changes added to commit (use "git add" and/or "git commit -a")
  236. student@infpc-205:~/newrepo$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement