Concept of git tracking and git staging

Git essentially has 4 main statuses for the files in your local repo: untracked: The file is new, Git knows nothing about it. If you git add <file>, it becomes: staged: Now Git knows the file (tracked), but also made it part of the next commit batch (called the index). If you git commit, it … Read more

How to set NODE_ENV from package.json for react

As per the docs, we cannot override NODE_ENV, but there is a room to create our own custom variables starting with REACT_APP_. So i configured to look as below: Reference: https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables “staging”: “concurrently -k \”npm:staging-server\” \”cross-env REACT_APP_ENVIRONMENT=’staging’ PORT=3003 react-scripts start\””, And inside my UI application, I can fetch its value by consoling it like this: … Read more

How do I push different branches to different heroku apps?

You should add another remote for my-app-prod named prod-heroku (replace GIT_URL with the Git URL that you can find in the settings page of my-app-prod in heroku): git remote add prod-heroku GIT_URL git push prod-heroku production:master This will push your local branch production to the remote branch master in prod-heroku so my-app-prod will get deployed … Read more

Staging database good practices

By bypassing staging and making changes in production is a recipe for disaster and disuse. As you make those changes the definition of minor begins to change. Secondly as the two environments depart (i.e. staging no longer matches production) things break and you lose confidence in the staging environment. To get the most from a … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)