w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
git master/staging/production setup, how to revert staging?

Usually people prefer not to rewrite history, since your project can lose vital detail and information about design decisions. What I would suggest, then, is that any changes you decide you don't want in production, you revert them. That way, you remove the unwanted changes, but preserve the chain of events that tells you why you made the decision to drop certain changes or features.

To use this command, run git revert <commit>.

Once you've removed your unwanted commit from staging, merge staging into your master branch:

  • git checkout master

  • git merge staging





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.