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.

  • Can I amend a commit to the master branch from a new local branch?
  • how to search for all commits of a particular filename?
  • How can I list the git subtrees on the root?
  • Git - nullSha1: contains entries pointing to null sha1
  • Version Control on Mac
  • Git: how to put modifications from master to branch?
  • How to solve this issue or what is recommended way of deploying application from git ?

  • How can I push changes directly from Cloud9 IDE to Heroku?
  • git diff displaying only changed lines in renamed files
  • Howto merge a svn repository with a git cloned repository (imported from SVN via github)
  • Git: How to be sure untracked config files aren't silently deleted
  • How to open files in Notepad++ from Git Bash?
  • Web API (like github REST API) for a personal Git server repo to enable “git log”?
  • 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.