

Thus, if you say, “Revert to Production” while in dev mode, your dev branch will pull from the faulty `HEAD` that you reverted in previous steps. As a project progresses through different revisions, those revisions are published as a commit.
Changes to be committed: (use 'git restore -stagedWell look at both of them in this article. First, run git status to make sure you have staged the file (meaning you used git add) : On branch main Your branch is up to date with 'origin/main'. Previous HEAD position was 10f6dd9 Merge changes from Github, whales are. Introduction Git is a popular project tracking application. There are two possible ways to undo your last commit. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. However, the ` HEAD` of your remote production branch will have been unchanged. Use git checkout master to return to most recent state.
#Github revert to previous commit code
Note: At this point, your local production code will now have been reverted to the specified commit. curl -i -X POST -H "X-Looker-Deploy-Secret:" 4 - Re-enter Production in your project. The revert command The revert command will create a commit that reverts the changes of the commit being targeted.

We'll look at both of them in this article. Grab the commit SHA, eg e289a61, of the commit you would like to revert to.ģ - Hit the SHA Advanced Deploy webhook using curl. There are two possible ways to undo your last commit. Copy the secret, you will need it in step 3.Ģ - In Your Git Provider: Find the specific commit you would like to revert to in the commit history of the Production Branch In Git you can revert the changes made to a file if you haven’t committed them yet, as well as you can revert a file to any previous commit. Must use a non-looker hosted repository which you have credentials to accessġ - In Looker’s Project Settings, enable “ Advanced Deploy” and set a Webhook Secret.Your Looker instance must be accessible from the public internet, or you must be able to curl to the instance from command line.Must be on a version that supports advanced deploy and have it enabled.
