I have a repo consisting of files, related to four Ruby homework task. My fifth task is to refactor each of the previous four tasks the best way I can and mark each small refactoring as a single git commit, so that when one opens the git history, they could easily see what has changed (like Use map instead of each
, Rename instance variable
, etc.). I have a branch, called task-1
and now I am done with my commits for the first task. I want to merge it to master
. Then I will make a new branch task-2
and when ready, will merge it to master
. But I want to have a clear indicator where commits, related to task 1 finish and commits for task 2 begin in git history. One way would be to amend the commit message of my last commit to include ..and finish task 1
, but I was wondering if there is some more intelligent way. Another way I though of, was to make a minor change, like add a space somewhere and use the commit message for this commit. What is the proper way to mark important events / milestones in git / Github?
Use git tag
to mark important milestones in your code.
Example - git tag -a v1
will tag the current code as v1. You can always checkout this code by running git checkout v1
git tag -l
can list all your tags.
Finally, remember to push your tags to the remote repository - git push --tags
I believe git tags are best suited for your purpose.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With