Lab 6

Git, GitHub, and EGit

  1. Finish the "Introduction to GitHub" lab in Lab4 tutorial folder to create your GitHub account and try out some features of the GitHub workflow.
  2. Note that "Add collaborator" have been changed to "Access group" under repository setting

  3. Installing EGit in Eclipse

    Under "Install New Software", enter "https://download.eclipse.org/egit/updates"

    Select Git integration for Eclipse, then click Next to finish the installation.

  4. Initial configuration

    Select Window -> Preferences -> Team -> Git -> Configuration and hit the "New Entry..." Button, enter user.name and user.email to configure the user

  5. Clone and Pull

    Select File -> Import -> Git -> Project from Git(with smart import), select "Clone URI" and enter "https://github.com/SCOPEterenceChan/cgisb" in URI field, select Master to continue the import

    Create a new directory for local destination

    You might try to import the "CHK121COMlab3q1SimpleBillingFromXML" repository and compare the result.

  6. Creating GitHub repository

    A repository without README.md

  7. Creating local repository and adding file

    Commands to add "README.md"

    In Eclipse, after you have created your project i.e. "lab3q1", select and right clicking it, click Team -> Share Project to Create an Egit repository

    Note that creation of repositories in the Eclipse workspace is not recommended.

  8. Adding file, commit and push

    Copy or create programes for your project, note the change in project and programe icons. Select "Add to index" under Team menu will change "?" to "+". Click "Commit" to invoke the Git Staging Window, enter commit message and click "Commit and Push..."

    Enter remote Git URI