Changes between Version 2 and Version 3 of faq/git-for-web-development


Ignore:
Timestamp:
Aug 10, 2011, 7:26:06 AM (14 years ago)
Author:
Mallory Knodel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • faq/git-for-web-development

    v2 v3  
    22These 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.
    33
    4  * ssh into your MF/PL server
     4 * ssh into your MF/PL server and navigate to your website's directory.
    55
    6   * Goto your web directory and do:
     6  * Initalize your git project with the following three commands:
    77{{{
    88git init
    99git add sites/all
    1010git 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{{{
    1114cd ../include
    1215git clone --bare ../web REPONAME.git
     16}}}
     17  * We need to go back to our original .git repo and edit the {{{config}}} file
     18
     19{{{
    1320cd ../web/.git
    1421}}}
    15   * Edit the config file so that it looks like this
     22    so that it looks like this:
    1623{{{
    1724[core]
     
    2734        merge = refs/heads/master
    2835}}}
     36 * Navigate back to your web directory, where the .git directory is located, and do a push to your origin:
     37{{{
     38git push origin master
     39}}}
    2940
    30  * On Your Local machine
    31   * cd into your local directory and 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:
    3243{{{
    3344git clone ssh://<USERNAME>@MYSITENAME.org/home/members/MEMBERNAME/sites/MYSITENAME.org/include/REPONAME.git
     
    4152git commit -am "Added test-file."
    4253git push
     54}}}
    4355
    4456  * From server cd into your web directory and do: