Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user@user-ws:~/temp/git$ mkdir bare
- user@user-ws:~/temp/git$ cd bare
- user@user-ws:~/temp/git/bare$ git init --bare
- Initialized empty Git repository in /home/user/temp/git/bare/
- user@user-ws:~/temp/git/bare$ cd ..
- user@user-ws:~/temp/git$ mkdir non-bare
- user@user-ws:~/temp/git$ cd non-bare
- user@user-ws:~/temp/git/non-bare$ git init
- Initialized empty Git repository in /home/user/temp/git/non-bare/.git/
- user@user-ws:~/temp/git/non-bare$ echo abc > file.txt
- user@user-ws:~/temp/git/non-bare$ git add file.txt
- user@user-ws:~/temp/git/non-bare$ git commit -m Initial
- [master (root-commit) 58ebd4d] Initial
- 1 file changed, 1 insertion(+)
- create mode 100644 file.txt
- user@user-ws:~/temp/git/non-bare$ git remote add origin ../bare
- user@user-ws:~/temp/git/non-bare$ git push -f --mirror
- Counting objects: 3, done.
- Writing objects: 100% (3/3), 225 bytes | 0 bytes/s, done.
- Total 3 (delta 0), reused 0 (delta 0)
- To ../bare
- * [new branch] master -> master
- user@user-ws:~/temp/git/non-bare$ cd ..
- user@user-ws:~/temp/git$ find
- .
- ./bare
- ./bare/objects
- ./bare/objects/8b
- ./bare/objects/8b/aef1b4abc478178b004d62031cf7fe6db6f903
- ./bare/objects/58
- ./bare/objects/58/ebd4d08b756999374204e48bb836d48d2f75a4
- ./bare/objects/pack
- ./bare/objects/a7
- ./bare/objects/a7/ef7b47eb77f166b193e451d06dbf4a6e93bb5d
- ./bare/objects/info
- ./bare/refs
- ./bare/refs/heads
- ./bare/refs/heads/master
- ./bare/refs/tags
- ./bare/hooks
- ./bare/hooks/applypatch-msg.sample
- ./bare/hooks/commit-msg.sample
- ./bare/hooks/pre-rebase.sample
- ./bare/hooks/post-update.sample
- ./bare/hooks/pre-commit.sample
- ./bare/hooks/pre-applypatch.sample
- ./bare/hooks/pre-push.sample
- ./bare/hooks/prepare-commit-msg.sample
- ./bare/hooks/update.sample
- ./bare/config
- ./bare/description
- ./bare/branches
- ./bare/info
- ./bare/info/exclude
- ./bare/HEAD
- ./non-bare
- ./non-bare/file.txt
- ./non-bare/.git
- ./non-bare/.git/objects
- ./non-bare/.git/objects/8b
- ./non-bare/.git/objects/8b/aef1b4abc478178b004d62031cf7fe6db6f903
- ./non-bare/.git/objects/58
- ./non-bare/.git/objects/58/ebd4d08b756999374204e48bb836d48d2f75a4
- ./non-bare/.git/objects/pack
- ./non-bare/.git/objects/a7
- ./non-bare/.git/objects/a7/ef7b47eb77f166b193e451d06dbf4a6e93bb5d
- ./non-bare/.git/objects/info
- ./non-bare/.git/refs
- ./non-bare/.git/refs/heads
- ./non-bare/.git/refs/heads/master
- ./non-bare/.git/refs/tags
- ./non-bare/.git/refs/remotes
- ./non-bare/.git/refs/remotes/origin
- ./non-bare/.git/refs/remotes/origin/master
- ./non-bare/.git/logs
- ./non-bare/.git/logs/refs
- ./non-bare/.git/logs/refs/heads
- ./non-bare/.git/logs/refs/heads/master
- ./non-bare/.git/logs/refs/remotes
- ./non-bare/.git/logs/refs/remotes/origin
- ./non-bare/.git/logs/refs/remotes/origin/master
- ./non-bare/.git/logs/HEAD
- ./non-bare/.git/index
- ./non-bare/.git/hooks
- ./non-bare/.git/hooks/applypatch-msg.sample
- ./non-bare/.git/hooks/commit-msg.sample
- ./non-bare/.git/hooks/pre-rebase.sample
- ./non-bare/.git/hooks/post-update.sample
- ./non-bare/.git/hooks/pre-commit.sample
- ./non-bare/.git/hooks/pre-applypatch.sample
- ./non-bare/.git/hooks/pre-push.sample
- ./non-bare/.git/hooks/prepare-commit-msg.sample
- ./non-bare/.git/hooks/update.sample
- ./non-bare/.git/config
- ./non-bare/.git/COMMIT_EDITMSG
- ./non-bare/.git/description
- ./non-bare/.git/branches
- ./non-bare/.git/info
- ./non-bare/.git/info/exclude
- ./non-bare/.git/HEAD
- user@user-ws:~/temp/git$ mkdir clone
- user@user-ws:~/temp/git$ cd clone
- user@user-ws:~/temp/git/clone$ git clone ../bare
- Cloning into 'bare'...
- done.
- user@user-ws:~/temp/git/clone$ find
- .
- ./bare
- ./bare/file.txt
- ./bare/.git
- ./bare/.git/objects
- ./bare/.git/objects/8b
- ./bare/.git/objects/8b/aef1b4abc478178b004d62031cf7fe6db6f903
- ./bare/.git/objects/58
- ./bare/.git/objects/58/ebd4d08b756999374204e48bb836d48d2f75a4
- ./bare/.git/objects/pack
- ./bare/.git/objects/a7
- ./bare/.git/objects/a7/ef7b47eb77f166b193e451d06dbf4a6e93bb5d
- ./bare/.git/objects/info
- ./bare/.git/refs
- ./bare/.git/refs/heads
- ./bare/.git/refs/heads/master
- ./bare/.git/refs/tags
- ./bare/.git/refs/remotes
- ./bare/.git/refs/remotes/origin
- ./bare/.git/refs/remotes/origin/HEAD
- ./bare/.git/logs
- ./bare/.git/logs/refs
- ./bare/.git/logs/refs/heads
- ./bare/.git/logs/refs/heads/master
- ./bare/.git/logs/refs/remotes
- ./bare/.git/logs/refs/remotes/origin
- ./bare/.git/logs/refs/remotes/origin/HEAD
- ./bare/.git/logs/HEAD
- ./bare/.git/packed-refs
- ./bare/.git/index
- ./bare/.git/hooks
- ./bare/.git/hooks/applypatch-msg.sample
- ./bare/.git/hooks/commit-msg.sample
- ./bare/.git/hooks/pre-rebase.sample
- ./bare/.git/hooks/post-update.sample
- ./bare/.git/hooks/pre-commit.sample
- ./bare/.git/hooks/pre-applypatch.sample
- ./bare/.git/hooks/pre-push.sample
- ./bare/.git/hooks/prepare-commit-msg.sample
- ./bare/.git/hooks/update.sample
- ./bare/.git/config
- ./bare/.git/description
- ./bare/.git/branches
- ./bare/.git/info
- ./bare/.git/info/exclude
- ./bare/.git/HEAD
- user@user-ws:~/temp/git/clone$ cat bare/file.txt
- abc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement