Version 1 (modified by Ross, 10 years ago) (diff)


Creating a git web development repository on mfpl

These instructions are targeted to Linux operating systems. If you run Windows or Mac (we suggest switching to an open source OS), you can find instructions for your local machine online. The instructions for the server will be the same. For more detailed instructions on using git go here.

  • ssh into your MF/PL server
  • Goto your web directory and do:
    git init
    git add sites/all
    git commit -am "Initial Import"
    cd ../include
    git clone --bare ../web REPONAME.git
    cd ../web/.git
  • Edit the config file so that it looks like this
            repositoryformatversion = 0
            filemode = true
            bare = false
            logallrefupdates = true
    [remote "origin"]
    	url = /home/members/<USERNAME>/sites/
            fetch = +refs/heads/*:refs/remotes/origin/*
    [branch "master"]
            remote = origin
            merge = refs/heads/master
  • On Your Local machine
    • cd into your local directory and do:
      git clone ssh://<USERNAME>
  • Test the repository
    • From local machine in ./REPONAME/sites directory do:
      touch test-file
      git add test-file
      git commit -am "Added test-file."
      git push
        * From server cd into your web directory and do:
      git pull
      == Now you can use your repository for web development ==