From 29e1e3c59f8c8f113dd334b054c3335c265a6c48 Mon Sep 17 00:00:00 2001
From: Chris Burgess <chris@giantrobot.co.nz>
Date: Wed, 22 Jun 2016 09:42:06 +1200
Subject: [PATCH] Importing "GitHub for CiviCRM" from Wiki. WIP.

---
 docs/develop-deprecated.md | 31 +++++++++++++++++++++++++++++++
 docs/develop.md            | 23 +++++++++++++++++++++--
 docs/git.md                | 13 +++++++++++++
 mkdocs.yml                 |  5 ++++-
 4 files changed, 69 insertions(+), 3 deletions(-)
 create mode 100644 docs/develop-deprecated.md
 create mode 100644 docs/git.md

diff --git a/docs/develop-deprecated.md b/docs/develop-deprecated.md
new file mode 100644
index 00000000..081885c0
--- /dev/null
+++ b/docs/develop-deprecated.md
@@ -0,0 +1,31 @@
+# Deprecated developer instructions
+
+These instructions are for historical reference only, but may be of use if the newer processes don't suit your working environment.
+
+## Deprecated: Manual checkout from Github
+
+Steps:
+
+* Perform a standard CiviCRM install from tarball
+* Use the "gitify" command to replace the codebase with the latest code from git.
+
+Obtain the existing CiviCRM directory (such as `/var/www/drupal/sites/all/modules/civicrm` or `/home/myuser/src/civicrm`), then run the `gitify` command. You will need to adapt the command arguments, but a typical case would be:
+
+    cd /tmp
+    wget https://github.com/civicrm/civicrm-core/raw/master/bin/gitify
+    bash gitify Drupal git://github.com/civicrm /var/www/drupal/sites/all/modules/civicrm --hooks
+
+If you develop for multi-CMS, then you might have one copy of CiviCRM (e.g. `/home/myuser/src/civicrm`) shared by each CMS. You can use `gitify` to setup this directory, and then use symlinks to share among CMSs:
+
+    ## Create ~/src/civicrm
+    mkdir -p ~/src/civicrm
+    wget https://github.com/civicrm/civicrm-core/raw/master/bin/gitify
+    bash gitify all git://github.com/civicrm ~/src/civicrm --l10n --hooks
+
+    ## Replace an old symlink with new symlink
+    rm /var/www/drupal7/sites/all/modules/civicrm
+    ln -s ~/src/civicrm /var/www/drupal7/sites/all/modules/civicrm
+
+## References
+
+* [Wiki: GitHub For CiviCRM](https://wiki.civicrm.org/confluence/display/CRMDOC43/GitHub+for+CiviCRM)
diff --git a/docs/develop.md b/docs/develop.md
index f58af5f5..738197f7 100644
--- a/docs/develop.md
+++ b/docs/develop.md
@@ -1,3 +1,22 @@
-*Develop*
+# Develop
 
-TODO: Assimilate http://wiki.civicrm.org/confluence/display/CRMDOC/GitHub+for+CiviCRM
+Tip: If Git or GitHub are unfamiliar to you, see [Git and GitHub](git.md) first.
+
+## Repositories
+
+CiviCRM is divided into a few repositories. This allows developers to work with different components, allows different teams to manage each component, and will allow all the pieces to be remixed using different tools (civibuild, shell scripts, Drush & Drush make, or composer). The repositories are:
+
+* [civicrm-core](https://github.com/civicrm/civicrm-core/) - Core application which can be embedded in different systems (Drupal, Joomla, etc).
+* [civicrm-drupal](https://github.com/civicrm/civicrm-drupal/) - Drupal integration modules, with branches for each CiviCRM release & Drupal major version (e.g. 7.x-4.6, 7.x-4.7, 6.x-4.4, 6.x-4.6).
+* [civicrm-joomla](https://github.com/civicrm/civicrm-joomla/) - Joomla integration modules.
+* [civicrm-wordpress](https://github.com/civicrm/civicrm-wordpress/) - WordPress integration modules.
+* [civicrm-packages](https://github.com/civicrm/civicrm-packages/) - External dependencies required by CiviCRM.
+* [civicrm-l10n](https://github.com/civicrm/civicrm-l10n/) - Localization data.
+
+## Obtaining a development build of CiviCRM
+
+The recommended method is to use [CiviCRM Buildkit](https://github.com/civicrm/civicrm-buildkit/) to build a CiviCRM codebase to develop with.
+
+## Deprecated instructions
+
+Previous methods for obtaining a CiviCRM source build are documented at [Deprecated Developer Processes](develop-deprecated.md).
diff --git a/docs/git.md b/docs/git.md
new file mode 100644
index 00000000..e39ae08c
--- /dev/null
+++ b/docs/git.md
@@ -0,0 +1,13 @@
+# Git and GitHub
+
+**Git** is a "source-code management system" or "version control system" – an alternative to Subversion. It was designed for a large open-source project (Linux) and has seen broad adoption among other FOSS projects.  **GitHub** is a company which provides hosted, web-based tools for enhancing Git development. For open projects like CiviCRM, its services are free.
+
+Git and GitHub offer advantages for CiviCRM development:
+
+* The tools are already popular among FOSS projects and web developers.
+* The tools are free ("as in beer") and mostly free ("as in speech").
+* They support off-line development.
+* They support lightweight branching, merging, and code-review.
+* They support open teams – anyone can jump-in, make changes, and share changes.
+
+For more introductions to Git and Github, see [help.github.com](https://help.github.com/).
diff --git a/mkdocs.yml b/mkdocs.yml
index 170a7457..5bedbc60 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -8,6 +8,7 @@ pages:
    - Customize: customize.md
    - Extend: extend.md
    - Develop: develop.md
+   - Git: git.md
    - Testing: testing.md
  - 'Reference: APIv3':
    - General: api/general.md
@@ -18,6 +19,8 @@ pages:
  - 'Reference: Hooks':
    - General: hook.md
    - Database: hooks-db.md
- - Gunk:
+ - Miscellaneous:
    - Markdown: markdownrules.md
    - hookref-old: hookref-old.md
+ - Deprecated:
+   - 'Building CiviCRM from source': develop-deprecated.md
-- 
GitLab