Class GitHub Repository¶
All of the files that you may need to access for this class will be pushed to the GitHub repository amath586s2016.
Git is a version control system that you might want to use for your own work. You are encouraged to do so! If so, there’s a list of some useful resources at the bottom of this page.
But for the purpose of this class it will primarily be used as an easy way to distribute materials, and you don’t necessarily need to know much more than what’s on this page to use it.
If you are Using SageMathCloud, Git is installed on all your projects automatically and so you should be able to clone the repository with the command below.
If you’re not familiar with Git and/or do not have it installed on your laptop, see Set Up Git on GitHub. Note that GitHub is being used to host the public class repository, but you do not need a GitHub account to clone the repository.
However, you do need Git installed for the commands below to work!
To clone this repository:
git clone https://github.com/rjleveque/amath586s2016.git
This will create a directory amath586s2016.
AM586 environment variable¶
I suggest you define an environment variable AM586 that points to this repository, e.g. in the bash shell:
export AM586=/full/path/to/amath586s2016
You can put this command in the file ~/.bashrc if you want it to be executed every time you open a new shell.
Then you can do, e.g.
cd $AM586
to change directories to the class repository.
Below and elsewhere in these notes, $AM586 will be used to refer to the full path to the class repository.
To update¶
If new files have been added to the class repository, you can get them by doing:
cd $AM586
git pull
Your copy of these files¶
To avoid having to worry about conflicts if you change a file and the same file changes in the repository, I suggest that you never modify the files in this directory. Instead, create another directory for doing your own work, e.g.
cd
mkdir my586
export MY586=/full/path/to/my586
Then copy any files you need to this directory before working with them, e.g.
cp -r $AM586/homeworks/hw1 $MY586/
will recursively copy the directory hw1.
Then modify the files in the new hw1 directory.
Other git references¶
There are many tutorials and other sources of information available for Git. In particular, see:
- Software Carpentry lessons
- https://www.atlassian.com/git/tutorials/
- https://try.github.io/ walks you through some basics.
- Set Up Git from GitHub includes information on how to install git.
- Git cheat sheet
- Some other resources
- Pro Git book
- Try googling “git tutorial” or a particular command such as “git pull”.
- Once you have git installed, type e.g. git help pull in a shell.
- See also GitHub Desktop if you’re looking for an app to make it easier to interact with GitHub.