Added a comment: Caveat with 'git checkout synced/master'
This commit is contained in:
parent
b1079f9d21
commit
8e453613ce
1 changed files with 26 additions and 0 deletions
|
@ -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)
|
||||
"""]]
|
Loading…
Add table
Reference in a new issue