I’d like to improve my workflow so I decided myself use git.

Till now for my projects, on my web server, I had 2 folders which are prod and dev.

Once modifications are over I sync both of my folders.

I tried to use git like this way :

```
// on my prod folder
$ git init 
$ git add *
$ git commit -a

```

Then on parent folder

```
$ git clone prod dev

```

Works like a charm I got my dev folder as perfect cot of prod
But now once my modifications are ok I can’t commit to prod. How can I achieve that ?! Thx

**EDIT**

Here is my organization tree on my web server : 

```
home
|--git
   |--.ssh
   |--repositories
      |-- myfirstrepo.git
          |-- index.html

```

What I'm trying to achieve is from `/var/www`

```
$ git clone /home/git/repositories/myfirstrepo.git
Initialized empty Git repository in /var/www/myfirstrepo_wc/.git/

```

I got the clone of my repo in

```
var
|--www
   |--myfirstrepo_wc
      |--index.html

```

So now I make change to my index.html file in `/var/www/myfirstrepo_wc` then

```
$ git status
# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   www/index.html
#
no changes added to commit (use "git add" and/or "git commit -a")

```

Make commit

```
$ git commit -a
[master d19749d] first commit from working copy
Committer: root <root@localhost.localdomain>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

    git config --global user.name "Your Name"
    git config --global user.email you@example.com

If the identity used for this commit is wrong, you can fix it with:

git commit --amend --author='Your Name <you@example.com>'

1 files changed, 1 insertions(+), 0 deletions(-)

```

then want to pull to my repo who is in `/home/git/repositories/myfirstrepo.git`

```
$ git pull origin master
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 358 bytes, done.
Total 4 (delta 0), 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/myfirstrepo.git
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to '/git/myfirstrepo.git'

```