Open murjax opened 6 years ago
useful links, https://stackoverflow.com/questions/4404172/how-to-tag-an-older-commit-in-git https://stackoverflow.com/questions/32155929/how-to-ignore-files-per-branches
Im thinking this could be automated, and I could write you a solution if you want. in another repo 1) you make your changes in dev branch, for production. 2) type the command and it makes a tag for HEAD~ and then reverts 3) configure your cli to take the most recent tag in production environments.
in this implementation your dev environment never has that pesky data manipulation.
Instead you make the change in dev branch that is going to production and the command makes the tag and reverts back to the clean dev environment when you are done.
now you dont have to worry about it because the production env will pick it up via the cli next time you deploy to production.
@murjax, let me know how it turns out.
I'm not sure if this within the scope of this application's goals, but here is an issue that I think could be covered with this app.
In Rails we occasionally do data migrations. This involves creating a migration that adds or modifies a column, then updates or manipulates actual data. (e.g. Moving the user's address from the
users
table to theusers_locations
table). Initially such a migration will work just fine, and in production as well. But we reset our database in dev frequently, so such data migrations are problematic because they assume data exists. To get around this, I currently put a production restriction on the data migration part (if Rails.env.production?
). Preferably though I would like a tool to remove the data migration code from the git history once done.Once again I'm not sure if that is applicable to this, but I thought I'd share anyway because this seems to cover similar concepts.