Due to language barrier, I will start by explaining what do I want:
I Want to use git as my server config file revision control.
I'm using zfs.
I will have few repositories, 1 for host, and 1 for each jail.
I want to keep these repositories on separate zfs partition /git
when I commit some changes I want to be able to push them to /git/hostname.git repository.
And this is the part I fail. I tried few different methods creating git repositories and they all failed with this
I also tried to create bare repository and still no luck. I'm defiantly missing something simple here
any hints how to implement this?
I Want to use git as my server config file revision control.
I'm using zfs.
I will have few repositories, 1 for host, and 1 for each jail.
I want to keep these repositories on separate zfs partition /git
when I commit some changes I want to be able to push them to /git/hostname.git repository.
And this is the part I fail. I tried few different methods creating git repositories and they all failed with this
Code:
$ git push
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 341 bytes, done.
Total 4 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.
remote: error: refusing to update checked out branch: refs/heads/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 /git/root.bsdroot.lv.git
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to '/git/root.bsdroot.lv.git'
I also tried to create bare repository and still no luck. I'm defiantly missing something simple here
any hints how to implement this?