This post describes a minimal, practical Git workflow tailored for researchers in the Continuous Symmetry Measure (CSM) group. The goal is organized personal work, clear checkpoints, and reliable history-not code publication or open-source workflows.
We assume a repository such as pdbprep, used to manage scientific files (e.g., molecular structures, processed outputs, and short documentation).
Repository URL: https://github.com/continuous-symmetry-measure/pdbprep
git init
Repeat until you are ready to save a clear step:
git status -> make changes -> git add -> git commit
git push
git tag # only for version release
You create a new working directory for a fresh research task, initialize it with git init, and begin recording your work from the very first files.
cd existing_project_directory
git init
Repeat until you are ready to save a clear step:
git status -> make changes -> git add -> git commit
git push
git tag # only for version release
You already have a directory with files and results, but no version control. Running git init allows you to start managing the project history from this point onward.
There are two common situations:
Clone (group repository):
git clone https://github.com/continuous-symmetry-measure/pdbprep.git
cd pdbprep
Repeat until you are ready to save a clear step:
git status -> make changes -> git add -> git commit
git push
git tag # only for version release
You clone an existing repository from the group organization and work on it locally.
Fork (personal copy):
# Fork on GitHub first
git clone https://github.com/<your-username>/pdbprep.git
cd pdbprep
Repeat until you are ready to save a clear step:
git status -> make changes -> git add -> git commit
git push
git tag # only for version release
You work independently on your own fork.
In all cases, the local workflow (status -> add -> commit -> push) is the same; the difference is where the changes are pushed.
v1.0, v1.1, v2.0Before you can use git push, a repository must already exist on GitHub. This is a one-time setup step.
In the context of the CSM group, this usually means:
pdbprep).gitignore)GitHub will now show you the repository URL, which you will use locally.
After running git init locally and creating at least one commit, you connect your project to GitHub:
git remote add origin https://github.com/continuous-symmetry-measure/pdbprep.git
From this point on, git push knows where to send your commits.
The following sections walk through the basic Git commands used in all cases above. Each command corresponds to a concrete action in your day-to-day research workflow.
git init - Initialize a RepositoryThis turns a regular working directory (for example, one containing structure files and a README) into a Git-tracked project. From this point on, Git observes changes-even if they are scientific data files rather than code.
git status - Check Repository StateThis is your primary visibility tool. It tells you what has changed since the last recorded step. For our work, it is useful to run this often, even if you are not yet ready to commit.
At this stage, you work as usual:
Git detects changes automatically, but nothing is saved to history yet.
git add - Select a Coherent StepExamples:
Add a single file, entire directory, ormultiple files using a wildcard
git add structure_01.pdb structures/ *.pdb
Add everything under the current directory:
git add .
Staging means selecting which changes define the next research step. A good commit represents one clear stage of work, not a mixture of unrelated experiments.
git commit - Record a Research Checkpointgit commit -m "Describe the completed step"
A commit is a deliberate checkpoint. The message should help future you or another group member understand what changed and why. Think of commits as entries in a lab notebook.
git push - Save and Continuegit push # or
git push origin main
This step stores your checkpoints in the shared GitHub repository. It serves as backup and continuity for the group-not public publication.
git tag - Mark Released Versionsgit tag v1.0
A tag marks a released version of the project. I think it should be used sparingly, only for versions you explicitly want to name and reference.
Use tags when:
v1.0, v1.1, v2.0Do not use tags for routine progress or intermediate steps.
Tags do not replace commits or pushes - they sit on top of them and signal an official release.
You do not need to memorize commands. Focus on the rhythm:
If you can answer “what changed since the last step?”, Git is already working for you.