To continue with our git story: Read the full series on GIT for doctors here

If you think you have made a mistake, you can “stash” the changes. Your file will be returned to the previous state. You have the option of returning to the stash if needed, but this is beyond our scope at present.

Now let us consider another scenario: You have two differential diagnosis for your patient and you want to investigate the patient for both conditions. You may decide to keep two versions of the same case sheet to continue the work up on both differentials. In Git you can create a “branch” for this situation. You can work on branches independently. The main branch or the trunk is called “master” by convention. You can give any name for the other branches.

Embiodea
Embiodea (Photo credit: beapen)

If you decide to consult your colleague, he/she may want to continue working on their copy without changing the “master” file in your possession. So they can work on their “branches” too. Later on if you want to add your differential branch or your colleague’s branch into the master file, you can choose “merge”.

You can create branches of branches. If you want to merge several such branches into the “master”, you have to paste all branches together into a single branch. This is called “rebase”.

If you have to submit a master chart for audit, you can “tag” the chart, so that you can give a name to the current state. “Tagging” for software is generally done when you decide to release a version to the end user.

In the next part, I will discuss how to collaborate with your friends. If you are not on github.com as yet, do register for an account now. If you want to follow someone, let me suggest yours truly: https://github.com/dermatologist

Read the full series on GIT for doctors here

Bell Eapen
Follow Me