-
Notifications
You must be signed in to change notification settings - Fork 239
GitHowTo
To get the source code of Macaulay2 if you are not a package developer, one "clones" our git repository with one of the following shell commands:
git clone [email protected]:Macaulay2/M2
git clone https://github.com/Macaulay2/M2
The source code will appear in a directory called M2
, which you may rename if you wish. In that directory you can find the following items of interest:
- Source code for the package Foo: the file
M2/Macaulay2/packages/Foo.m2
and possibly the directoryM2/Macaulay2/packages/Foo/
and its contents. - Instructions for building Macaulay2:
M2/INSTALL
Start by "forking" the Macaulay2 repository, by following the following steps in a browser.
- Create a github account at https://github.com/
- We'll assume below that your user name is
JohnDoe
.
- We'll assume below that your user name is
- Add your ssh key at https://github.com/settings/ssh
- Fork M2 at https://github.com/Macaulay2/M2/fork
Then use one of the following shell commands to get a copy of your copy of the source code of Macaulay2:
git clone [email protected]:JohnDoe/M2
git clone https://github.com/JohnDoe/M2
Edit and test your code. Whenever you want to send your changes to your local copy of M2, issue the following shell commands:
- Add the files with changes to be committed:
git add FILENAME ...
- Commit the files to your local copy of the repository:
git commit
. An editor window will pop up in which you should type a message describing the changes, with this format:- First line is 50 characters or less
- Then a blank line
- Remaining text should be wrapped at 72 characters
- Push the commited changes to your fork of M2 at github:
git push
Repeat at will. Whenever you want to send your changes to the central Macaulay2 repository, do this in a browser:
- Issue a pull request at https://github.com/JohnDoe/M2/pull/new/linalg, or find the pull request button on the page of your fork at https://github.com/JohnDoe/M2.
Homepage | Projects | Packages | Documentation | Events | Google Group