Advertisement
Guest User

Untitled

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