From 8e453613cec81cb157638f3b6616ceca30feaee6 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawkRW96vF6lsjg57muQ4nPnQqJJUAKGKGzw" Date: Fri, 26 Dec 2014 07:43:18 +0000 Subject: [PATCH] Added a comment: Caveat with 'git checkout synced/master' --- ..._cd04cfaf97f200d5e581b83bb8d018b2._comment | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 doc/forum/remote_server_client_repositories_are_bare__33____63__/comment_4_cd04cfaf97f200d5e581b83bb8d018b2._comment diff --git a/doc/forum/remote_server_client_repositories_are_bare__33____63__/comment_4_cd04cfaf97f200d5e581b83bb8d018b2._comment b/doc/forum/remote_server_client_repositories_are_bare__33____63__/comment_4_cd04cfaf97f200d5e581b83bb8d018b2._comment new file mode 100644 index 0000000000..5213a7f950 --- /dev/null +++ b/doc/forum/remote_server_client_repositories_are_bare__33____63__/comment_4_cd04cfaf97f200d5e581b83bb8d018b2._comment @@ -0,0 +1,26 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawkRW96vF6lsjg57muQ4nPnQqJJUAKGKGzw" + nickname="Catalin" + subject="Caveat with 'git checkout synced/master'" + date="2014-12-26T07:43:18Z" + content=""" +There's at least one caveat with the 'git checkout synced/master' workaround. When the local assistant next tries to sync with the remote, it will try to push, and the remote will refuse the push into the currently checked out branch: + +[2014-12-26 02:40:10 EST] main: Syncing with nyc.nanobit.org_annex +remote: error: refusing to update checked out branch: refs/heads/synced/master +remote: error: By default, updating the current branch in a non-bare repository +remote: error: is denied, because it will make the index and work tree inconsistent +remote: error: with what you pushed, and will require 'git reset --hard' to match +remote: error: the work tree to HEAD. +remote: error: +remote: error: You can set 'receive.denyCurrentBranch' configuration variable to +remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into +remote: error: its current branch; however, this is not recommended unless you +remote: error: arranged to update its work tree to match what you pushed in some +remote: error: other way. +remote: error: +remote: error: To squelch this message and still keep the default behaviour, set +remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'. +To ssh://catalinp@git-annex-nyc.nanobit.org-catalinp_22_annex/~/annex/ + ! [remote rejected] annex/direct/master -> synced/master (branch is currently checked out) +"""]]