Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

git revert to old commit

thecameroncobb answered on July 16, 2020 Popularity 10/10 Helpfulness 4/10

Contents


More Related Answers

  • git reset to commit
  • git reset to latest commit
  • git revert latest commit
  • revert back to a commit git
  • git reset head to previous commit
  • git return to last commit
  • git reset to last commit local
  • go back one commit git
  • git revert to commit
  • git back to last commit
  • github rollback commit
  • github restore previous commit
  • git revert back to specific commit
  • revert changes of a previous commit git
  • how to revert to last git commit
  • git go back to previous commit
  • how to revert back to one commit
  • How do I revert a Git repository to a previous commit?
  • How do I revert a Git repository to a previous commit?
  • reset to commit
  • how to move to previous commit in git
  • git go back to previous commit
  • reset to commit
  • rollback to a previous commit

  • git revert to old commit

    -1
    Popularity 10/10 Helpfulness 4/10 Language shell
    Link to this answer
    Share Copy Link
    Contributed on Dec 28 2020
    thecameroncobb
    0 Answers  Avg Quality 2/10

    Closely Related Answers



    4
    Popularity 10/10 Helpfulness 7/10 Language shell
    Source: Grepper
    Tags: commit co
    Link to this answer
    Share Copy Link
    Contributed on Dec 24 2022
    Shadow
    0 Answers  Avg Quality 2/10

    0
    Popularity 9/10 Helpfulness 5/10 Language shell
    Tags: commit co
    Link to this answer
    Share Copy Link
    Contributed on May 04 2021
    Wicked Worm
    0 Answers  Avg Quality 2/10

    0
    Popularity 10/10 Helpfulness 4/10 Language shell
    Source: Grepper
    Tags: back
    Link to this answer
    Share Copy Link
    Contributed on Jul 16 2020
    CuteKittyCat
    0 Answers  Avg Quality 2/10

    -1
    Popularity 10/10 Helpfulness 4/10 Language shell
    Source: Grepper
    Tags: commit co
    Link to this answer
    Share Copy Link
    Contributed on Dec 29 2021
    Trained Tuna
    0 Answers  Avg Quality 2/10

    0
    Popularity 10/10 Helpfulness 4/10 Language shell
    Tags: commit co
    Link to this answer
    Share Copy Link
    Contributed on Aug 30 2022
    Rashedul Islam
    0 Answers  Avg Quality 2/10

    0

    I have a simple solution using a patch to revert all your changes.

    1. Checkout current head branch (e.g. develop)

    git checkout develop

    2. Lookup your commit-id in the history log, and check out only your changes into a new branch:

    git log

    git checkout -b your-branch

    3. Look up in your branch, and find the previous status you want to revert to:

    git checkout -b prev-status

    4. Create a patch that can revert all your changes:

    git diff your-branch..prev-status > reverts.patch

    # the comparing order of branches is important

    5. checkout current head branch and apply the reverting patch

    git checkout origin develop

    git apply reverts.patch

    git add *

    git commit -m "revert all my changes" 

    Popularity 7/10 Helpfulness 2/10 Language whatever
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Mar 13 2023
    Vivek Kakadan
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.