Changes between Version 2 and Version 3 of faq/git-for-web-development
- Timestamp:
- Aug 10, 2011, 7:26:06 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
faq/git-for-web-development
v2 v3 2 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]. There is another method to achieve the same effect using [http://joemaller.com/990/a-web-focused-git-workflow/ git remote add] that might be useful. 3 3 4 * ssh into your MF/PL server 4 * ssh into your MF/PL server and navigate to your website's directory. 5 5 6 * Goto your web directory and do:6 * Initalize your git project with the following three commands: 7 7 {{{ 8 8 git init 9 9 git add sites/all 10 10 git commit -am "Initial Import" 11 }}} 12 * Now we need to setup the repository's origin. We can do this on the MF/PL server, too, just in the {{{include}}} directory. 13 {{{ 11 14 cd ../include 12 15 git clone --bare ../web REPONAME.git 16 }}} 17 * We need to go back to our original .git repo and edit the {{{config}}} file 18 19 {{{ 13 20 cd ../web/.git 14 21 }}} 15 * Edit the config file so that it looks like this22 so that it looks like this: 16 23 {{{ 17 24 [core] … … 27 34 merge = refs/heads/master 28 35 }}} 36 * Navigate back to your web directory, where the .git directory is located, and do a push to your origin: 37 {{{ 38 git push origin master 39 }}} 29 40 30 * On Your Local machine31 * cd into your local directoryand do:41 * Great! Now if you're doing development offline on your local machine, you'll need to set up the repository there, too: 42 * cd into your {{{sites}}} directory (or wherever your have your local projects) and do: 32 43 {{{ 33 44 git clone ssh://<USERNAME>@MYSITENAME.org/home/members/MEMBERNAME/sites/MYSITENAME.org/include/REPONAME.git … … 41 52 git commit -am "Added test-file." 42 53 git push 54 }}} 43 55 44 56 * From server cd into your web directory and do: