-
Notifications
You must be signed in to change notification settings - Fork 17
Description
@srinivvenkat @bryanleroylewis
https://github.com/NSSAC/Coding-Tips-And-Tricks/blob/master/git/readme.md
I've copied in that markdown (at the time of this comment), below.
Use a tag To Mark the State of Any Code Referenced In a Publication
e.g., to add a tag to the commit (branch?) currently checked out.
git tag -a pub2019Sept16To tag a past commit, simply find and add the hash.
git log
git tag -a pub2019Sept16 4a33129cfb03ba9c418846440601bb712c507c80Like when commiting, your default editor (vim, in my case) should open to enable you to compose a complete (useful) message.
e.g., maybe include something like the following:
Code state for <title> publication https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1007111
It might even be good to use the tag url when referencing the code in the publication, so people aren't confused if things have changed since the publication. It should still be apparent that/how code changed, when they see the other (newer) branches/commits which are available.
If the readme file mentions the publication, it could also note that tag url.
Tags don't automatically get pushed to remotes, so make sure to do that.
e.g.
git push origin pub2019Sept16Just including people who might like this suggestion, or have additional input.
@HenningMortveit @shoops @dmachi