If the commit has not been cherry-picked, you won’t see any output and you can go home knowing that the fix is not in production. To check whether you’ve cherry-picked the change, run git cherry like so: $ git cherry -v f011235 The exception to this rule is when you cherry-picked the change from a branch. If the command returns no results, it’s not in production. ![]() So the answer to my question: “Did make it to production yet?” is, indeed, “Yes.” If the change has been in prod for a while, you may see more results here (one for each production release). Thanks to a descriptive tagging scheme, the output tells me that the change was installed in prod today. Since I’m tagging all my production releases as described above, I can just do this: $ git tag -contains f011235 | grep prod We can use git tag -contains to list all the tags that contain a commit. So I want to know if f011235 in production yet. Now let’s get back to your question: “Did make it to production yet?” I’ll use the commit SHA f011235 for this example – I happen to know that f011235 is the commit I need in production, thanks to a descriptive commit message (like “fixed #811”). Make sure to make your tags readable and descriptive, like prod-.) We’re going to use git to list all the tags for a commit to answer our question. I can’t help you until you’re tagging your production releases. (If you’re not doing that, start doing it now. Prerequisites: the code in question is controlled with git and every production release is tagged in a way that clearly indicates it’s in production. This Git Pro Tip answers the question: “Is in production yet?” As an iOS developer on an app that communicates with a Rails backend, I often ask the Rails team whether a change has made it to production.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |