Git marks my new pushed files as deleted in the remote repository (staging server) -


whenever push local code staging server (a remote repository) don't show instead appear in 'git status' deleted. how can set properly?

i work in local repository ('development' branch). other non-git people putting files directly on server (and server period updates well). have set server 'staging' branch. when want push code server. add / commit changes made on server in 'staging' branch. pull them down local 'staging' branch. merge them 'development' branch. push 'staging' branch server. unfortunately no longer working - new files marked 'deleted' , changed files marked 'modified'. how can resolve condition? files don't appear in directory.

i suspect has change made there resolve fact live staging server , wanted able push checked-out branch.

git config receive.denycurrentbranch ignore  

any help, ideas, scorn, ridicule, resolutions, appreciated.

are saying you're working developers not using source code control @ --- pushing changes directly deployment?

you can setup bare repo allow you:

  • to add , accept files working tree (not managed git)
  • to push own file (after having pulled first, in order take account files added non-git users)

the first point can done cron job would, instance every minutes, a:

cd /your/bare/repo git --work-tree /path/to/non/git/workingtree add -a git commit -m "add files non-git users" 

(you might want adapt naive implementation in order commit if files added)

the second point needs completed post-receive hook on bare repo in order automatically copy files on non-git user repo.

this isn't ideal solution there possibility of race condition: needs more robust, possible chown or other right management, preventing non-git users modifications while pushing -- updating working tree.

but shows possible way make 2 world collaborate each other.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -