Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to mark important events / milestones in Git history?

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?

like image 879
Alexander Popov Avatar asked Jan 21 '14 13:01

Alexander Popov


2 Answers

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

like image 172
First Zero Avatar answered Oct 31 '22 03:10

First Zero


I believe git tags are best suited for your purpose.

like image 28
gravetii Avatar answered Oct 31 '22 02:10

gravetii