How to git pull with two users?

I deploy my applications by cloning repository into production server.
When I make some changes I just go to the production server and invoke : git pull .
I don’t know if this is the right way of deploying but it works fine for me for now.

But I have one issue, recently I’ve started working with another developer and to
update the repository we have to know each other passwords and do git pull on production server, which is of course nonsense . Before GIT I used SVN and there was no such issues,
everybody could invoke svn update with his account.

  • Is git stash stack pushed to the remote repo?
  • git lock keeps coming back on commit rendering GIT useless
  • Update an imported repo from github to bitbucket
  • When pushing to Heroku: An error occurred in the application and your page could not be served. Please try again in a few moments
  • Git merge fails unexpected
  • Associate an empty git commit with files
  • How to solve this issue or what is recommended way of deploying application from git ?

  • Detach (move) multiple subdirectories into separate Git repository
  • Cannot get git extensions to push something to github SSH problems
  • Aptana fatal: Unable to create '.git/index.lock': File exists
  • Exec not returning anything when trying to run git shortlog with nodejs
  • github in ubuntu looking for the application?
  • how to sync repos of bitbucket on github?
  • One Solution collect form web for “How to git pull with two users?”

    If the problem is that you don’t have the right permissions to run git pull on a repository checked out by another user, you can try to initialise your production repository using --shared=all, which will tell git to set permissions so that anyone can run git commands.

    Git Baby is a git and github fan, let's start git clone.