visual studio 2012 - Git error on committing new repository ([remote rejected] master ) -


i have project want place on git. never had issue git reason won't work project. projects on shared network drive. first created new repository on network drive cloned repository on system. copy existing project in git/projectname folder. when commit , try select added files error message can see in screenshot below.

enter image description here

only commit works fine when try push error message:

enter image description here

the error message after selecting files:

    warning: lf replaced crlf in tool/content/chosen.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/css/select2.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery-ui.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery.ui.accordion.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery.ui.all.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery.ui.autocomplete.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery.ui.base.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery.ui.button.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery.ui.core.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery.ui.datepicker.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery.ui.dialog.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery.ui.menu.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery.ui.progressbar.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery.ui.resizable.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery.ui.selectable.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery.ui.slider.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery.ui.spinner.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery.ui.tabs.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery.ui.theme.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/jquery.ui.tooltip.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/minified/jquery-ui.min.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/minified/jquery.ui.accordion.min.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/minified/jquery.ui.autocomplete.min.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/minified/jquery.ui.button.min.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/minified/jquery.ui.core.min.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/minified/jquery.ui.datepicker.min.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/minified/jquery.ui.dialog.min.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/minified/jquery.ui.menu.min.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/minified/jquery.ui.progressbar.min.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/minified/jquery.ui.resizable.min.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/minified/jquery.ui.selectable.min.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/minified/jquery.ui.slider.min.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/minified/jquery.ui.spinner.min.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/minified/jquery.ui.tabs.min.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/minified/jquery.ui.theme.min.css. file have original line endings in working directory. warning: lf replaced crlf in tool/content/themes/base/minified/jquery.ui.tooltip.min.css. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/chosen.jquery.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/jquery-2.0.3.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/jquery-2.0.3.min.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/jquery-ui-1.10.3.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/jquery-ui-1.10.3.min.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/noty/jquery.noty.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/noty/layouts/bottom.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/noty/layouts/bottomcenter.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/noty/layouts/bottomleft.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/noty/layouts/bottomright.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/noty/layouts/center.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/noty/layouts/centerleft.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/noty/layouts/centerright.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/noty/layouts/inline.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/noty/layouts/top.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/noty/layouts/topcenter.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/noty/layouts/topleft.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/noty/layouts/topright.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/noty/promise.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/noty/themes/default.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/select2.js. file have original line endings in working directory. warning: lf replaced crlf in tool/scripts/select2.min.js. file have original line endings in working directory. warning: lf replaced crlf in packages/epplus.3.1.3.3/epplus.3.1.3.3.nuspec. file have original line endings in working directory. warning: lf replaced crlf in packages/select2.js.3.4.1.2/content/content/css/select2.css. file have original line endings in working directory. warning: lf replaced crlf in packages/select2.js.3.4.1.2/content/scripts/select2.js. file have original line endings in working directory. warning: lf replaced crlf in packages/select2.js.3.4.1.2/content/scripts/select2.min.js. file have original line endings in working directory. warning: lf replaced crlf in packages/chosen.0.12.0/content/content/chosen.css. file have original line endings in working directory. warning: lf replaced crlf in packages/chosen.jquery.0.12.0/content/scripts/chosen.jquery.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.2.0.3/content/scripts/jquery-2.0.3.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.2.0.3/content/scripts/jquery-2.0.3.min.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.2.0.3/jquery.2.0.3.nuspec. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery-ui.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery.ui.accordion.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery.ui.all.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery.ui.autocomplete.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery.ui.base.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery.ui.button.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery.ui.core.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery.ui.datepicker.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery.ui.dialog.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery.ui.menu.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery.ui.progressbar.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery.ui.resizable.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery.ui.selectable.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery.ui.slider.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery.ui.spinner.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery.ui.tabs.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery.ui.theme.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/jquery.ui.tooltip.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/minified/jquery-ui.min.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/minified/jquery.ui.accordion.min.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/minified/jquery.ui.autocomplete.min.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/minified/jquery.ui.button.min.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/minified/jquery.ui.core.min.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/minified/jquery.ui.datepicker.min.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/minified/jquery.ui.dialog.min.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/minified/jquery.ui.menu.min.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/minified/jquery.ui.progressbar.min.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/minified/jquery.ui.resizable.min.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/minified/jquery.ui.selectable.min.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/minified/jquery.ui.slider.min.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/minified/jquery.ui.spinner.min.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/minified/jquery.ui.tabs.min.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/minified/jquery.ui.theme.min.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/content/themes/base/minified/jquery.ui.tooltip.min.css. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/scripts/jquery-ui-1.10.3.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/content/scripts/jquery-ui-1.10.3.min.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.ui.combined.1.10.3/jquery.ui.combined.1.10.3.nuspec. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.noty.2.1.0/content/scripts/noty/jquery.noty.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.noty.2.1.0/content/scripts/noty/layouts/bottom.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.noty.2.1.0/content/scripts/noty/layouts/bottomcenter.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.noty.2.1.0/content/scripts/noty/layouts/bottomleft.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.noty.2.1.0/content/scripts/noty/layouts/bottomright.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.noty.2.1.0/content/scripts/noty/layouts/center.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.noty.2.1.0/content/scripts/noty/layouts/centerleft.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.noty.2.1.0/content/scripts/noty/layouts/centerright.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.noty.2.1.0/content/scripts/noty/layouts/inline.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.noty.2.1.0/content/scripts/noty/layouts/top.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.noty.2.1.0/content/scripts/noty/layouts/topcenter.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.noty.2.1.0/content/scripts/noty/layouts/topleft.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.noty.2.1.0/content/scripts/noty/layouts/topright.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.noty.2.1.0/content/scripts/noty/promise.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.noty.2.1.0/content/scripts/noty/themes/default.js. file have original line endings in working directory. warning: lf replaced crlf in packages/jquery.noty.2.1.0/jquery.noty.2.1.0.nuspec. file have original line endings in working directory. donestage 303 files 

error message after push:

"c:\program files (x86)\git\bin\git.exe" push --recurse-submodules=check --progress "origin" master:master counting objects: 236, done. delta compression using 4 threads. total 236 (delta 55), reused 0 (delta 0) remote: error: refusing update checked out branch: refs/heads/master[k remote: error: default, updating current branch in non-bare repository[k remote: error: denied, because make index , work tree inconsistent[k remote: error: pushed, , require 'git reset --hard' match[k remote: error: work tree head.[k remote: error: [k remote: error: can set 'receive.denycurrentbranch' configuration variable to[k remote: error: 'ignore' or 'warn' in remote repository allow pushing into[k remote: error: current branch; however, not recommended unless you[k remote: error: arranged update work tree match pushed in some[k remote: error: other way.[k remote: error: [k remote: error: squelch message , still keep default behaviour, set[k remote: error: 'receive.denycurrentbranch' configuration variable 'refuse'.[k g:/etemplate_tools  ! [remote rejected] master -> master (branch checked out) error: failed push refs 'g:/etemplate_tools' done 

after try second push:

"c:\program files (x86)\git\bin\git.exe" push --recurse-submodules=check --progress "origin" master:master counting objects: 236, done. delta compression using 4 threads. total 236 (delta 56), reused 0 (delta 0) remote: error: unable write sha1 filename ./objects/pack/pack-53d213811e38773414f34a05b02d1051e5609dc5.pack: permission denied[k remote: fatal: cannot store pack file[k error: unpack failed: index-pack abnormal exit g:/etemplate_tools  ! [remote rejected] master -> master (unpacker error) error: failed push refs 'g:/etemplate_tools' done 

ok, here go. there 3 apparent issues git setup.

thanks @cupcake pointing out third one.

from important least important:

  • you try push non-bare repository. not recommended , error recent git versions. should push bare repo. further information let me refer here: https://stackoverflow.com/a/18260792/2536029

  • you have set core.autocrlf other false. causes git try automatically convert line endings depending on exact value of core.autocrlf, environment, files in question , applied conversions.

    some argue useful in scenarios contributors use windows , others use unix, in opinion more causes trouble because unexpectedly changes files in ways difficult predict (especially novices) , hard track down/communicate lost when discussing things via mail and/or other channels.

    <rant> git not convert code python, if tell python most. not translate comments french, if use french locale. should leave line endings intact... </rant>

    for information how change core.autocrlf see https://help.github.com/articles/dealing-with-line-endings keep in mind github recommends different do. under discussion , mileage might vary...

  • nuget seems kind of package manager downloads prepackaged (binary) data. committing binary data. not hard error @cupcake , predict not happy on long run.

    for small things jquery or bootstrap ok , simplify deployment while not burdening git, git not binary blobs , if have lots of them or big binaries become more , more noticeable, @ point apparent , suck. not break, suck , ruin git experience.

    you should other ways track binaries. nuget seems reasonable run nuget whereever deploy/clone repo, binary media assets (e.g. in game development) situation git sadder.

best regards


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -