git add and commit successful but push fails -


i have been using git make changes project. added files changed , committed changes. when tried push changes got following. explain doing wrong? appreciated

c:\users\ace\desktop\github\projectzero [master]> git push  warning: permanently added 'ip address' (rsa) list of known hosts.     counting objects: 11, done. delta compression using 4 threads. compressing objects: 100% (5/5), done. writing objects: 100% (6/6), 599 bytes | 0 bytes/s, done. total 6 (delta 4), reused 0 (delta 0) remote: error: refusing update checked out branch: refs/heads/master remote: error: default, updating current branch in non-bare repository remote: error: denied, because make index , work tree inconsistent remote: error: pushed, , require 'git reset --hard' match remote: error: work tree head. remote: error: remote: error: can set 'receive.denycurrentbranch' configuration variable remote: error: 'ignore' or 'warn' in remote repository allow pushing remote: error: current branch; however, not recommended unless remote: error: arranged update work tree match pushed in remote: error: other way. remote: error: remote: error: squelch message , still keep default behaviour, set remote: error: 'receive.denycurrentbranch' configuration variable 'refuse'.  amazon:/var/www/html/projectzero/   ! [remote rejected] master -> master (branch checked out)  error: failed push refs 'amazon:/var/www/html/projectzero/' 

! [remote rejected] master -> master (branch checked out)

this means pushing non-bare repository, i.e. 1 contains working tree, , branch you're pushing checked out.

this rejected because if working on remote machine in clone branch working on suddenly, mysteriously modified.

to fix problem either use bare repository @ remote end, or login remote machine , check out different (non-master) branch, can push updates master


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -