Skip to main content
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

First, if you want to have a team working on Mathematica code, then you really should do it properly and use Wolfram Workbench. As pointed out by LeonidLeonid, notebooks are not the right tool for software development.

This said, I have used version control (git) with a notebook and successfully merged versions. To do it, I minimized the amount of metadata in the notebook by:

  1. Turning off Notebook History (and clearing any existing history using the dialog)
  2. Turning off the Notebook Cache (in the option inspector).

You can turn off both notebook options with with the single command

SetOptions[InputNotebook[], PrivateNotebookOptions -> {"FileOutlineCache" -> False}, TrackCellChangeTimes -> False] 

but clearing the existing notebook history (removing all of the CellChangeTimes cell options) is easiest using the provided dialog.

Outputs can be long and messy and normally don't want to be tracked by your VCS. Some input/ouput combinations I did want to keep, so I set the output cell option GeneratedCell->False and then both cells' options to make them non-deletable and non-editable. The rest of the output cells were removed using the Delete All Output menu option.

Finally, keep your notebook(s) well organised with sections and subsections so that work and changes are clearly localised, which will make possible merges easier.

First, if you want to have a team working on Mathematica code, then you really should do it properly and use Wolfram Workbench. As pointed out by Leonid, notebooks are not the right tool for software development.

This said, I have used version control (git) with a notebook and successfully merged versions. To do it, I minimized the amount of metadata in the notebook by:

  1. Turning off Notebook History (and clearing any existing history using the dialog)
  2. Turning off the Notebook Cache (in the option inspector).

You can turn off both notebook options with with the single command

SetOptions[InputNotebook[], PrivateNotebookOptions -> {"FileOutlineCache" -> False}, TrackCellChangeTimes -> False] 

but clearing the existing notebook history (removing all of the CellChangeTimes cell options) is easiest using the provided dialog.

Outputs can be long and messy and normally don't want to be tracked by your VCS. Some input/ouput combinations I did want to keep, so I set the output cell option GeneratedCell->False and then both cells' options to make them non-deletable and non-editable. The rest of the output cells were removed using the Delete All Output menu option.

Finally, keep your notebook(s) well organised with sections and subsections so that work and changes are clearly localised, which will make possible merges easier.

First, if you want to have a team working on Mathematica code, then you really should do it properly and use Wolfram Workbench. As pointed out by Leonid, notebooks are not the right tool for software development.

This said, I have used version control (git) with a notebook and successfully merged versions. To do it, I minimized the amount of metadata in the notebook by:

  1. Turning off Notebook History (and clearing any existing history using the dialog)
  2. Turning off the Notebook Cache (in the option inspector).

You can turn off both notebook options with with the single command

SetOptions[InputNotebook[], PrivateNotebookOptions -> {"FileOutlineCache" -> False}, TrackCellChangeTimes -> False] 

but clearing the existing notebook history (removing all of the CellChangeTimes cell options) is easiest using the provided dialog.

Outputs can be long and messy and normally don't want to be tracked by your VCS. Some input/ouput combinations I did want to keep, so I set the output cell option GeneratedCell->False and then both cells' options to make them non-deletable and non-editable. The rest of the output cells were removed using the Delete All Output menu option.

Finally, keep your notebook(s) well organised with sections and subsections so that work and changes are clearly localised, which will make possible merges easier.

inserted the missing "off" that was annoying me + small tweaks
Source Link
Simon
  • 10.3k
  • 5
  • 59
  • 73

First, if you want to have a team working on Mathematica code, then you really should do it properly and use Wolfram Workbench. As pointed out by Leonid, notebooks are not the right tool for software development.

This said, I have used version control (gitgit) ofwith a notebook and successfully merged versions. To do it, I minimized the amount of metadata in the notebook by:

  1. Turning off Notebook History (and clearing any existing history using the dialog)
  2. Turning off the Notebook Cache (in the option inspector).

You can turn off both notebook options with with the single command

SetOptions[InputNotebook[], PrivateNotebookOptions -> {"FileOutlineCache" -> False}, TrackCellChangeTimes -> False] 

but clearing the existing notebook history (removing all of the CellChangeTimes cell options) is easiest using the provided dialog.

Outputs can be long and messy and normally don't want to be tracked by your VCS. Some input/ouput combinations I did want to keep, so I set the output cell option GeneratedCell->False and then both cells' options to make them non-deletable and non-editable. The rest of the output cells were removed using the Delete All Output menu option.

Finally, keep your notebook(s) well organised with sections and subsections so that work and changes are clearly localised, which will make possible merges easier.

First, if you want to have a team working on Mathematica code, then you really should do it properly and use Wolfram Workbench. As pointed out by Leonid, notebooks are not the right tool for software development.

This said, I have used version control (git) of a notebook and successfully merged versions. To do it, I minimized the amount of metadata in the notebook by:

  1. Turning off Notebook History (and clearing any existing history using the dialog)
  2. Turning the Notebook Cache (in the option inspector).

You can turn off both notebook options with with the single command

SetOptions[InputNotebook[], PrivateNotebookOptions -> {"FileOutlineCache" -> False}, TrackCellChangeTimes -> False] 

but clearing the existing notebook history (removing all of the CellChangeTimes cell options) is easiest using the provided dialog.

Outputs can be long and messy and normally don't want to be tracked by your VCS. Some input/ouput combinations I did want to keep, so I set the output cell option GeneratedCell->False and then both cells' options to make them non-deletable and non-editable. The rest of the output cells were removed using the Delete All Output menu option.

Finally, keep your notebook(s) well organised with sections and subsections so that work and changes are clearly localised, which will make possible merges easier.

First, if you want to have a team working on Mathematica code, then you really should do it properly and use Wolfram Workbench. As pointed out by Leonid, notebooks are not the right tool for software development.

This said, I have used version control (git) with a notebook and successfully merged versions. To do it, I minimized the amount of metadata in the notebook by:

  1. Turning off Notebook History (and clearing any existing history using the dialog)
  2. Turning off the Notebook Cache (in the option inspector).

You can turn off both notebook options with with the single command

SetOptions[InputNotebook[], PrivateNotebookOptions -> {"FileOutlineCache" -> False}, TrackCellChangeTimes -> False] 

but clearing the existing notebook history (removing all of the CellChangeTimes cell options) is easiest using the provided dialog.

Outputs can be long and messy and normally don't want to be tracked by your VCS. Some input/ouput combinations I did want to keep, so I set the output cell option GeneratedCell->False and then both cells' options to make them non-deletable and non-editable. The rest of the output cells were removed using the Delete All Output menu option.

Finally, keep your notebook(s) well organised with sections and subsections so that work and changes are clearly localised, which will make possible merges easier.

added 61 characters in body
Source Link
Simon
  • 10.3k
  • 5
  • 59
  • 73

First, if you want to have a team working on Mathematica code, then you really should do it properly and use Wolfram Workbench. As pointed out by Leonid, notebooks are not the right tool for software development.

This said, I have used version control (git) of a notebook and successfully merged versions. To do it, I minimized the amount of metadata in the notebook by:

  1. Turning off Notebook History (and clearing any existing history using the dialog)
  2. Turning the Notebook Cache (in the option inspector).

You can turn off both notebook options with with the single command

SetOptions[InputNotebook[], PrivateNotebookOptions -> {"FileOutlineCache" -> False}, TrackCellChangeTimes -> False] 

but clearing the existing notebook history (removing all of the CellChangeTimes cell options) is easiest using the provided dialog.

Outputs can be long and messy and normally don't want to be tracked by your VCS. Some input/ouput combinations I did want to keep, so I set theirthe output cell option GeneratedCell->False and then both cells' options to make them non-editabledeletable and non-deletableeditable. The rest of the output cells were removed using the Delete All Output menu option.

Finally, keep your notebook(s) well organised with sections and subsections so that work and changes are clearly localised, which will make possible merges easier.

First, if you want to have a team working on Mathematica code, then you really should do it properly and use Wolfram Workbench. As pointed out by Leonid, notebooks are not the right tool for software development.

This said, I have used version control (git) of a notebook and successfully merged versions. To do it, I minimized the amount of metadata in the notebook by:

  1. Turning off Notebook History (and clearing any existing history using the dialog)
  2. Turning the Notebook Cache (in the option inspector).

You can turn off both notebook options with with the single command

SetOptions[InputNotebook[], PrivateNotebookOptions -> {"FileOutlineCache" -> False}, TrackCellChangeTimes -> False] 

but clearing the existing notebook history (removing all of the CellChangeTimes cell options) is easiest using the provided dialog.

Outputs can be long and messy and normally don't want to be tracked by your VCS. Some input/ouput combinations I did want to keep, so I set their options to make them non-editable and non-deletable. The rest of the output cells were removed using the Delete All Output menu option.

Finally, keep your notebook(s) well organised with sections and subsections so that work and changes are clearly localised, which will make possible merges easier.

First, if you want to have a team working on Mathematica code, then you really should do it properly and use Wolfram Workbench. As pointed out by Leonid, notebooks are not the right tool for software development.

This said, I have used version control (git) of a notebook and successfully merged versions. To do it, I minimized the amount of metadata in the notebook by:

  1. Turning off Notebook History (and clearing any existing history using the dialog)
  2. Turning the Notebook Cache (in the option inspector).

You can turn off both notebook options with with the single command

SetOptions[InputNotebook[], PrivateNotebookOptions -> {"FileOutlineCache" -> False}, TrackCellChangeTimes -> False] 

but clearing the existing notebook history (removing all of the CellChangeTimes cell options) is easiest using the provided dialog.

Outputs can be long and messy and normally don't want to be tracked by your VCS. Some input/ouput combinations I did want to keep, so I set the output cell option GeneratedCell->False and then both cells' options to make them non-deletable and non-editable. The rest of the output cells were removed using the Delete All Output menu option.

Finally, keep your notebook(s) well organised with sections and subsections so that work and changes are clearly localised, which will make possible merges easier.

Source Link
Simon
  • 10.3k
  • 5
  • 59
  • 73
Loading