git-annex/doc/forum/Using_git-annex.mdwn

74 lines
1.8 KiB
Text
Raw Normal View History

2014-10-27 21:27:49 +00:00
Hi,
I have created a git annex repo, added data. I then went to check it out in another location in the following way (my goal is to checkout origin, add a test file, push it back to origin).
git clone ../test_repo/
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
282 17:19 cd test_repo/
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
283 17:19 ls
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
284 17:19 git status
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
285 17:22 git annex init DEV
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
286 17:22 touch test.txt
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
287 17:22 vi test.txt
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
288 17:22 git annex merge
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
289 17:22 git annex add test.txt
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
290 17:22 git commit -am "test"
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
291 17:23 git push origin master git-annex
However I am getting the following error
Counting objects: 3, done.
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
Delta compression using up to 48 threads.
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
Compressing objects: 100% (3/3), done.
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
Writing objects: 100% (3/3), 364 bytes | 0 bytes/s, done.
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
Total 3 (delta 1), reused 0 (delta 0)
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
remote: error: refusing to update checked out branch: refs/heads/master
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
remote: error: By default, updating the current branch in a non-bare repository
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
remote: error: is denied, because it will make the index and work tree inconsistent
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
remote: error: with what you pushed, and will require 'git reset --hard' to match
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
remote: error: the work tree to HEAD.
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
remote: error:
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
remote: error: its current branch; however, this is not recommended unless you
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
remote: error: arranged to update its work tree to match what you pushed in some
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
remote: error: other way.
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
remote: error:
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
remote: error: To squelch this message and still keep the default behaviour, set
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
To /test_repo/
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
! [remote rejected] master -> master (branch is currently checked out)
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
error: failed to push some refs to '/test_repo/'
2014-10-27 21:31:40 +00:00
2014-10-27 21:27:49 +00:00
What am I missing?