| 1 | = Creating a git web development repository on mfpl = |
| 2 | 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 [http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html go here]. |
| 3 | |
| 4 | * ssh into your MF/PL server |
| 5 | |
| 6 | * Goto your web directory and do: |
| 7 | {{{ |
| 8 | git init |
| 9 | git add sites/all |
| 10 | git commit -am "Initial Import" |
| 11 | cd ../include |
| 12 | git clone --bare ../web REPONAME.git |
| 13 | cd ../web/.git |
| 14 | }}} |
| 15 | * Edit the config file so that it looks like this |
| 16 | {{{ |
| 17 | [core] |
| 18 | repositoryformatversion = 0 |
| 19 | filemode = true |
| 20 | bare = false |
| 21 | logallrefupdates = true |
| 22 | [remote "origin"] |
| 23 | url = /home/members/<USERNAME>/sites/MYSITE.org/include/REPONAME.git |
| 24 | fetch = +refs/heads/*:refs/remotes/origin/* |
| 25 | [branch "master"] |
| 26 | remote = origin |
| 27 | merge = refs/heads/master |
| 28 | }}} |
| 29 | |
| 30 | * On Your Local machine |
| 31 | * cd into your local directory and do: |
| 32 | {{{ |
| 33 | git clone ssh://<USERNAME>@MYSITENAME.org/home/members/MEMBERNAME/sites/MYSITENAME.org/include/REPONAME.git |
| 34 | }}} |
| 35 | |
| 36 | * Test the repository |
| 37 | * From local machine in ./REPONAME/sites directory do: |
| 38 | {{{ |
| 39 | touch test-file |
| 40 | git add test-file |
| 41 | git commit -am "Added test-file." |
| 42 | git push |
| 43 | |
| 44 | * From server cd into your web directory and do: |
| 45 | {{{ |
| 46 | git pull |
| 47 | }}} |
| 48 | |
| 49 | == Now you can use your repository for web development == |