Middlebury

Git

Revision as of 10:22, 16 October 2019 by Adam Franco (talk | contribs) (Remove outdated git.middlebury.edu references.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page provides details on how LIS staff can use Git to collaborate and version-control their projects. Excellent documentation on using Git is available on the web, so this page focuses on our particular work-flows rather than basic usage.

For those looking for more resources for learning Git, see:

Recommended tools for working with Git

OS X

  • Git - The core Git command-line program and the Git-GUI user interface and the Gitk graphical history browser.
  • Source Tree - A nice GUI for working with Git.

Windows

  • Git - The core Git command-line program and the Git-GUI user interface and the Gitk graphical history browser.
  • Source Tree - A nice GUI for working with Git that includes helpers for managing SSH keys.

Linux

  • Git - The core Git command-line program and the Git-GUI user interface and the Gitk graphical history browser.

Remote Linux hosts via X11

One common work-flow is to do your work on a remote Linux host from a Mac or Windows workstation. You will usually open a remote shell via Terminal (OS X) or Putty (Windows) so that you can get a command-line on the remote Linux host. If the Linux host has Git installed, you can use it's command-line interface through your terminal. Additionally, you can usually also use the graphical Git GUI and Gitk interfaces by running an X11 server on your workstation.

The X11 has been around for decades and lets you easily run GUI programs across the network. X11 has an inverted client-server model from what most of us are used to: Your work-station runs an X11 'server' program that draws the GUI on your screen, while the X11 'client' is a program on the remote host that sends drawing commands to the server on your work-station.

  1. Install the X11-server on your workstation.
  2. Open a remote shell with SSH providing x-forwarding.
    • On OS X run
      ssh -X user@host
      Your Terminal should automatically start XQuartz when you run ssh with the -X parameter.
    • On Windows open Putty and _________.


Central Repositories

The .git/ directory in your project is a full 'repository' and contains all of the changes sets that make up your project's history. It is perfectly fine to use git without ever interacting with remote services. That said, often we need to share our projects with others to collaborate as well as to make sure that our valuable efforts are backed up. To enable sharing, we push our change-sets from our local working repository to a central repository that is accessible by others in our 'team'. For our open-source development efforts that we share freely with the world, we use GitHub as our central-repository host as it aids collaboration with others outside of the institution. 

Powered by MediaWiki