Go with the flow

For a Git-based workflow to be the an effective means through which you consolidate significant changes to code and data, everyone involved in making changes should “go with the flow”: abide by your team’s chosen workflow when making changes and never make changes outside of Git control. This implies that:

  • Every file and directory in the code base or dataset being managed is tracked by Git.

  • Git is told about all significant change: by making commits and by ensuring that Git can keep track (for example by renaming or moving files via Git).

  • The person making a significant change commits it and writes the commit message since only that person fully understands what was done and why.

  • All the local and remote Git repositories involved are connected so that change can flow between them.

  • No out-of-band means to distribute change are used:

    • No DropBox, SharePoint, or OneDrive.

    • No network filesystem with shared access.

    • No emailed attachments.

Instead of opting for quick fixes, you will have to be mindful in the moment, investing some thought into what changes to consolidate, and how to best describe them to your collaborators and your future you. By making these small investments in the here and now, much long-term gain follows: instead of a mismanaged mess, you will have a well-managed code base or dataset flowing from a productive collaboration.