i'm working on web project frequent merges , releases production. i'd repository contain full record of ever pushed onto production server, can analyse error log entry 3 weeks ago knowing code in production @ time.
i cannot use release
branch because in git, there no concept of history of commits made on specific branch. use release
branch currently, not enable me answer question of "what code in production 3 weeks ago".
so, how should in git?
tags intended kind of use on git. can read tags here.
as per question, can have list of tags, hence knowing has been released. example on git scm-book is:
$ git tag -l 'v1.4.2.*' v1.4.2.1 v1.4.2.2 v1.4.2.3 v1.4.2.4
checking out specific tag put in exact same condition when code released.
you can gpg sign tags, can helpful in shared repository, should bother mixing things (either on purpose or accident).
please note that:
by default, git push command doesn’t transfer tags remote servers. have explicitly push tags shared server after have created them. process sharing remote branches — can run git push origin [tagname].
as result in terrible headache if assumed did.
as in git, need sha of commit, writing down sufficient, depending on needs.
Comments
Post a Comment