Published on Yale University Library (https://web.library.yale.edu)

Home > Printer-friendly > Github Connection

Github Connection

** Library site is on Acquia Cloud now, no more many of the following functions, see Starting with an Acquia Cloud [1] site instead.

New Member First Time Connection
  • Install Git for Window [2]. Open Git Shell, Identify yourself to Git
    • > git config --global user.name 'Your Name'
    • > git config --global user.email you@ [3]yale.edu
  • Log in to GitHub: Enterprise using Yale netID [4]
  • Give Admin your netid to add you into the desire repository (example: yul/dev.library.yale.edu)
  • Log in to GitHub, Go to yul/dev.library.yale.edu > Click "Fork" to (@netid) to create your own repository
    => netid/dev.library.yale.edu
  • Go to the new created repository, clone HTTPS URL (Click copy to clickboard icon)
    => https://git.yale.edu/ [4]netid/dev.library.yale.edu.git
  • Open Git Shell on your desktop, do the following
    • > git clone https://git.yale.edu/ [4]netid/dev.library.yale.edu.git c:\drupal\dev.library.yale.edu (create local copy at your local location)
    • > cd /
    • > cd drupal/dev.library.yale.edu
    • > git remote -v  (you should get: 
      origin https://git.yale.edu/netid/dev.library.yale.edu.git [5](fetch)
      origin https://git.yale.edu/netid/dev.library.yale.edu.git [5](push)
    • > git remote add upstream https://git.yale.edu/yul/dev.library.yale.edu.git [6]
    • > git remote -v should get "origin" and "upstream" information for "fetch" and "push"
  • Start work on your local copy

Update:

  • Syncing a fork
    • > git fetch upstream (get update code from yul/dev.library.yale.edu)
    • > git checkout master (you might already in master and don't need this step)
    • > git merge upstream/master  (merge the new update to your local copy)
    • > git push origin master (sync the change in yul/dev.library.yale.edu from your local to netid\dev.library.yale.edu fork)
  • Change in yul/dev.library.yale.edu will be able see in http://dev.library.yale.edu [7]
  • ** Current default is mteac/dev.library.yale.edu if yul/dev.library.yale.edu doesn't work
  • Can make change directly on yul/dev.library.yale.edu 
  • To get the change to product site, do "Pull Requests" from yul/dev.library.yale.edu to drupal/d7, the change will be monitor by ITS, and deploy in Tuesday or Thursday night
  • To get the product environment to dev, do refresh request from http://yalesites.yale.edu/refresh-my-site [8]. (Notice other users about the refresh for them to save their works.)

One time Setup

  • Fork from drupal/d7 to yul => yul/dev.library.yale.edu
  • Add Jenkins
  • To create yul/dev.testimonies.yale.edu following the instruction "Forking multiple times" in the following reference "YaleSites Using GitHub Enterprise"
  • Create organization > "yul"
    • Add Members (mteac, kb89)
    • Create New Team > "testimonies" (Developers for Testimonies site) > Admin Access (The user must first log in with NetID to create account before add them to the team)
  • Add member
  • Add repository

References:

  • YaleSites Using Github Enterprise [9]
  • YaleSites Getting changes merged upstream [10]
  • YaleSites Common Git Operations [11]
  • GitHub Set Up Git [12]
  • GitHub Create A Repository [13]
  • GitHub Fork A Repo [14]
  • Drupal Installing Drush on Windows [15]

Source URL:https://web.library.yale.edu/lit/sr/github-connection

Links
[1] https://docs.acquia.com/dev-desktop/start/cloud [2] https://windows.github.com/ [3] mailto:you@$ [4] https://git.yale.edu/ [5] https://git.yale.edu/netid/dev.library.yale.edu.git [6] https://git.yale.edu/yul/dev.library.yale.edu.git [7] http://dev.library.yale.edu [8] http://yalesites.yale.edu/refresh-my-site [9] http://yalesites.yale.edu/book/using-github-enterprise [10] http://yalesites.yale.edu/book/getting-changes-merged-upstream [11] http://yalesites.yale.edu/book/common-git-operations [12] https://help.github.com/articles/set-up-git/ [13] https://help.github.com/articles/create-a-repo/ [14] https://help.github.com/articles/fork-a-repo/ [15] https://www.drupal.org/node/594744