Activity Forums Salesforce® Discussions How to roll back Git Commit in salesforce?

  • Kumar

    Member
    February 4, 2017 at 7:14 AM

    Hi Vikas,

    Reverting Working Copy to Most Recent Commit
    To revert to a previous commit, ignoring any changes:

    git reset --hard HEAD

    where HEAD is the last commit in your current branch

    Reverting The Working Copy to an Older Commit
    To revert to a commit that's older than the most recent commit:

    # Resets index to former commit; replace '56e05fced' with your commit code
    git reset 56e05fced

    # Moves pointer back to previous HEAD
    git reset --soft HEAD@{1}

    git commit -m "Revert to 56e05fced"

    # Updates working copy to reflect the new commit
    git reset --hard

Log In to reply.

Popular Salesforce Blogs

Enhancing Business Efficiency: Professional Salesforce Integration Services

Blog in

Salesforce integration services aim to enable seamless connections between Salesforce solutions and your other business-critical systems. In today's fast-paced digital landscape, businesses strive to optimize their operations, maximize productivity,…

Popular Salesforce Videos

Skip to toolbar