bład gita

witam, coś sie popsuło z gitem, utworzyłem od nowa repozytoria zarówno lokalne jak i zdalne, zaktulizowałem gita ale nie pomaga, gdy próbuje wykonac git push dostaje

[quote]Counting objects: 1030, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (958/958), done.
Writing objects: 100% (1030/1030), 843.69 KiB | 116 KiB/s, done.
Total 1030 (delta 85), reused 0 (delta 0)
error: refusing to update checked out branch: refs/heads/master
error: By default, updating the current branch in a non-bare repository
error: is denied, because it will make the index and work tree inconsistent
error: with what you pushed, and will require ‘git reset --hard’ to match
error: the work tree to HEAD.
error:
error: You can set ‘receive.denyCurrentBranch’ configuration variable to
error: ‘ignore’ or ‘warn’ in the remote repository to allow pushing into
error: its current branch; however, this is not recommended unless you
error: arranged to update its work tree to match what you pushed in some
error: other way.
error:
error: To squelch this message and still keep the default behaviour, set
error: ‘receive.denyCurrentBranch’ configuration variable to ‘refuse’.[/quote]
ktoś wie co się podziało ?

Zapomniales opcji --bare gdy tworzyles repozytorium zdalne ?

Uzywałem tego tutoriala http://www.megiteam.pl/blog/2009/11/1/zeby-bylo-git/

dzięki ! wyglada na to że pomogło :slight_smile: skasowałem zdalne i założyłem z git --bare init
dziwne bo używałem tego od paru tygodni i nagle się o to upomniało.

Nie trzeba kasować, wystarczy zmienić opcję w .git/config “bare = true” :slight_smile:

Bezpośrednia edycja .git/config nie jest polecana, lepiej użyć do tego “git config” czyli:

cd repozytorium git config --replace-all core.bare true
I jeszcze tylko dla potwierdzenia, że config został zmieniony:

git config -l