Skip to content

Berkeley2014_Git_Information

Mahrud Sayrafi edited this page Mar 12, 2021 · 1 revision

title: Berkeley2014 Git Information permalink: wiki/Berkeley2014_Git_Information/ layout: wiki

We formerly used subversion to edit our code and share with others. This support is being phased out.

We currently use git to manage the source code of Macaulay2.

Github is a central website/location for the hosting of git repositories (such as Macaulay2).

To get started with github, we suggest you follow the following steps by January 1st:

  • Sign up for github at https://github.com/
  • Email Dan Grayson your github account id (he has the participant list for this workshop)
  • Install git. There are several options (command line, GUI). Check them out here.
  • Tell git on your machine your username and email (see here).
  • Set up your SSH key (see here).
  • Create an avatar at Gravatar so github has an avatar to place next to your commits. This way we also can put a (user)name with a face!
  • Learn how to git! (see this free book here, as well as the other links provided below).

The last step of course is a bit heavy handed, but you should at least have the other tasks complete before January 1st.

As usual, we will be storing all of the work produced at the workshop under a common directory. With git, that means we will create a repository for this workshop, linked here.

For those used to subversion, here are a few comments. With subversion, you've been accustomed to using the commands

   svn update
   svn commit

Git is similar. Instead of "svn update" to get the changes made by others you'll use

   git pull

Instead of "svn commit" to transmit your changes to the repository you'll use

   git commit
   git push

The command "git commit" records your changes in your local (complete) copy of the repository, and the command "git push" transmits those updates made to your local copy of the repository to the remote copy of the repository at github.

There are various command line options that have to be learned to smooth operation, but those are the basic steps.

Let us know if you have any trouble. Better yet, post questions about the process on the Google group (here), so everyone can benefit from the answers.

Some potentially helpful webpages:

Pro git book

Magit, an Emacs mode for git

Try git, learn git by doing!

Learningit, a git repo on good git practices

The file demo.log from the first day of the workshop

Clone this wiki locally