Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. user@user-ws:~/temp/git$ mkdir bare
  2. user@user-ws:~/temp/git$ cd bare
  3. user@user-ws:~/temp/git/bare$ git init --bare
  4. Initialized empty Git repository in /home/user/temp/git/bare/
  5. user@user-ws:~/temp/git/bare$ cd ..
  6.  
  7.  
  8. user@user-ws:~/temp/git$ mkdir non-bare
  9. user@user-ws:~/temp/git$ cd non-bare
  10. user@user-ws:~/temp/git/non-bare$ git init
  11. Initialized empty Git repository in /home/user/temp/git/non-bare/.git/
  12. user@user-ws:~/temp/git/non-bare$ echo abc > file.txt
  13. user@user-ws:~/temp/git/non-bare$ git add file.txt
  14. user@user-ws:~/temp/git/non-bare$ git commit -m Initial
  15. [master (root-commit) 58ebd4d] Initial
  16. 1 file changed, 1 insertion(+)
  17. create mode 100644 file.txt
  18. user@user-ws:~/temp/git/non-bare$ git remote add origin ../bare
  19. user@user-ws:~/temp/git/non-bare$ git push -f --mirror
  20. Counting objects: 3, done.
  21. Writing objects: 100% (3/3), 225 bytes | 0 bytes/s, done.
  22. Total 3 (delta 0), reused 0 (delta 0)
  23. To ../bare
  24. * [new branch] master -> master
  25. user@user-ws:~/temp/git/non-bare$ cd ..
  26.  
  27.  
  28. user@user-ws:~/temp/git$ find
  29. .
  30. ./bare
  31. ./bare/objects
  32. ./bare/objects/8b
  33. ./bare/objects/8b/aef1b4abc478178b004d62031cf7fe6db6f903
  34. ./bare/objects/58
  35. ./bare/objects/58/ebd4d08b756999374204e48bb836d48d2f75a4
  36. ./bare/objects/pack
  37. ./bare/objects/a7
  38. ./bare/objects/a7/ef7b47eb77f166b193e451d06dbf4a6e93bb5d
  39. ./bare/objects/info
  40. ./bare/refs
  41. ./bare/refs/heads
  42. ./bare/refs/heads/master
  43. ./bare/refs/tags
  44. ./bare/hooks
  45. ./bare/hooks/applypatch-msg.sample
  46. ./bare/hooks/commit-msg.sample
  47. ./bare/hooks/pre-rebase.sample
  48. ./bare/hooks/post-update.sample
  49. ./bare/hooks/pre-commit.sample
  50. ./bare/hooks/pre-applypatch.sample
  51. ./bare/hooks/pre-push.sample
  52. ./bare/hooks/prepare-commit-msg.sample
  53. ./bare/hooks/update.sample
  54. ./bare/config
  55. ./bare/description
  56. ./bare/branches
  57. ./bare/info
  58. ./bare/info/exclude
  59. ./bare/HEAD
  60. ./non-bare
  61. ./non-bare/file.txt
  62. ./non-bare/.git
  63. ./non-bare/.git/objects
  64. ./non-bare/.git/objects/8b
  65. ./non-bare/.git/objects/8b/aef1b4abc478178b004d62031cf7fe6db6f903
  66. ./non-bare/.git/objects/58
  67. ./non-bare/.git/objects/58/ebd4d08b756999374204e48bb836d48d2f75a4
  68. ./non-bare/.git/objects/pack
  69. ./non-bare/.git/objects/a7
  70. ./non-bare/.git/objects/a7/ef7b47eb77f166b193e451d06dbf4a6e93bb5d
  71. ./non-bare/.git/objects/info
  72. ./non-bare/.git/refs
  73. ./non-bare/.git/refs/heads
  74. ./non-bare/.git/refs/heads/master
  75. ./non-bare/.git/refs/tags
  76. ./non-bare/.git/refs/remotes
  77. ./non-bare/.git/refs/remotes/origin
  78. ./non-bare/.git/refs/remotes/origin/master
  79. ./non-bare/.git/logs
  80. ./non-bare/.git/logs/refs
  81. ./non-bare/.git/logs/refs/heads
  82. ./non-bare/.git/logs/refs/heads/master
  83. ./non-bare/.git/logs/refs/remotes
  84. ./non-bare/.git/logs/refs/remotes/origin
  85. ./non-bare/.git/logs/refs/remotes/origin/master
  86. ./non-bare/.git/logs/HEAD
  87. ./non-bare/.git/index
  88. ./non-bare/.git/hooks
  89. ./non-bare/.git/hooks/applypatch-msg.sample
  90. ./non-bare/.git/hooks/commit-msg.sample
  91. ./non-bare/.git/hooks/pre-rebase.sample
  92. ./non-bare/.git/hooks/post-update.sample
  93. ./non-bare/.git/hooks/pre-commit.sample
  94. ./non-bare/.git/hooks/pre-applypatch.sample
  95. ./non-bare/.git/hooks/pre-push.sample
  96. ./non-bare/.git/hooks/prepare-commit-msg.sample
  97. ./non-bare/.git/hooks/update.sample
  98. ./non-bare/.git/config
  99. ./non-bare/.git/COMMIT_EDITMSG
  100. ./non-bare/.git/description
  101. ./non-bare/.git/branches
  102. ./non-bare/.git/info
  103. ./non-bare/.git/info/exclude
  104. ./non-bare/.git/HEAD
  105.  
  106.  
  107. user@user-ws:~/temp/git$ mkdir clone
  108. user@user-ws:~/temp/git$ cd clone
  109. user@user-ws:~/temp/git/clone$ git clone ../bare
  110. Cloning into 'bare'...
  111. done.
  112. user@user-ws:~/temp/git/clone$ find
  113. .
  114. ./bare
  115. ./bare/file.txt
  116. ./bare/.git
  117. ./bare/.git/objects
  118. ./bare/.git/objects/8b
  119. ./bare/.git/objects/8b/aef1b4abc478178b004d62031cf7fe6db6f903
  120. ./bare/.git/objects/58
  121. ./bare/.git/objects/58/ebd4d08b756999374204e48bb836d48d2f75a4
  122. ./bare/.git/objects/pack
  123. ./bare/.git/objects/a7
  124. ./bare/.git/objects/a7/ef7b47eb77f166b193e451d06dbf4a6e93bb5d
  125. ./bare/.git/objects/info
  126. ./bare/.git/refs
  127. ./bare/.git/refs/heads
  128. ./bare/.git/refs/heads/master
  129. ./bare/.git/refs/tags
  130. ./bare/.git/refs/remotes
  131. ./bare/.git/refs/remotes/origin
  132. ./bare/.git/refs/remotes/origin/HEAD
  133. ./bare/.git/logs
  134. ./bare/.git/logs/refs
  135. ./bare/.git/logs/refs/heads
  136. ./bare/.git/logs/refs/heads/master
  137. ./bare/.git/logs/refs/remotes
  138. ./bare/.git/logs/refs/remotes/origin
  139. ./bare/.git/logs/refs/remotes/origin/HEAD
  140. ./bare/.git/logs/HEAD
  141. ./bare/.git/packed-refs
  142. ./bare/.git/index
  143. ./bare/.git/hooks
  144. ./bare/.git/hooks/applypatch-msg.sample
  145. ./bare/.git/hooks/commit-msg.sample
  146. ./bare/.git/hooks/pre-rebase.sample
  147. ./bare/.git/hooks/post-update.sample
  148. ./bare/.git/hooks/pre-commit.sample
  149. ./bare/.git/hooks/pre-applypatch.sample
  150. ./bare/.git/hooks/pre-push.sample
  151. ./bare/.git/hooks/prepare-commit-msg.sample
  152. ./bare/.git/hooks/update.sample
  153. ./bare/.git/config
  154. ./bare/.git/description
  155. ./bare/.git/branches
  156. ./bare/.git/info
  157. ./bare/.git/info/exclude
  158. ./bare/.git/HEAD
  159. user@user-ws:~/temp/git/clone$ cat bare/file.txt
  160. abc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement