Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-15

git with detached worktrees , push has no effect

From: J. Bakshi <hidden>
Date: 2016-06-15 22:51:35

Hello list,


I have set the git bare repo with detached worktree to update website with post-receive hook. In short what I have done

[1] create the bare git with hook
-------------------------------------

git init --bare /home/git/web.git

cat > home/git/web.git/hooks/post-receive
#!/bin/sh
GIT_WORK_TREE=/opt/web git checkout -f

chmod +x /home/git/web.git/hooks/post-receive

chown -rvf wwwrun:www /home/git/web.git


[2] create the directory and set permission
--------------------------------------------

mkdir /opt/web
chown -Rvf wwwrun:www /opt/web


[3] cloning at my clinet and push
-----------------------------------

 git clone http://192.168.1.1/git/web.git

Cloning into web...
Username:
Password:
warning: You appear to have cloned an empty repository.

 touch A
 git add A

 git commit -m "add A"

[master (root-commit) 7662edd] add A
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 A

 git push
 Username:
 Password:
 Everything up-to-date


Why reports  [Everything up-to-date] rather than modify the remote git ?

Confused :-( 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help