What to do if you push incorrect information

What you can see in this article

I pushed the wrong information

The pushed information cannot be returned to the local repository. So be sure to check that the branch you're working on is correct before pushing. Even so, you may accidentally push it. You can't return that information to the local repository, but you can undo incorrect commit information in the remote repository.

How to undo a commit

cbe00f28b88d5f18b9c71024034afe3d.png

To undo a commit, we use a technique called revert. You can undo a commit that you accidentally pushed. Instead of deleting the commit, do an additional "commit to cancel the specified commit". revert cancels a commit by adding a change that is the opposite of the committed change

I have committed the wrong information

83c821f4a185cf767e80dcde53e109da.png

That's all from the scene!

Recommended Posts

What to do if you push incorrect information
What to do if you install Ubuntu
What to do if you accidentally create a model
What to do if you get a java.io.IOException in GlassFish
# What to do if you accidentally do rails db: migrate: drop
What to do if you can't use the rails command
What to do if you get a gcc error in Docker
What to do if you get a DISPLAY error in gym.render ()
What to do if you get angry with OpenSSL with pyenv install
What to do if you forget the root password in CentOS7
What to do if you cannot roll back the migration (UnknownMigrationVersionError)
[Rails] What to do if you can't get parameters with form_with
What to do if you get a groovy warning in Thymeleaf Layout
What to do if you get an error during rails db: reset
[Composer] [Laravel] What to do if you cannot install due to insufficient memory
What to do if the server tomcat dies
What to do if you get an uninitialized constant Likes Controller error
What to do if you can't install the plugin from the Eclipse marketplace
What to do if mvn archetype: generate fails
What to do if you don't like the code generated by swagger-codegen-cli
What do you use when converting to String?
What to do if you get an error when you hit Heroku logs
What to do if you get a MiniMagick vulnerability alert on GitHub
What to do if you get a SQLite3 :: BusyException: database is locked error
What to do if you get Could not locate Gemfile or .bundle / directory
What to do if you can't activate the select box created by bootstrap-select
What to do if you get the error message unrecognized selector send to instance "***"
What to do if you have installed Java for OS X on macOS
What to do if you get an error on heroku rake db: migrate
What to do if you get angry if you don't have nokogiri while installing wp2txt
What to do if you get To install the missing version, run `gem install bundler: 2.1.4`
What to do if the debug gem installation fails
What to do if the Rails server can't start
What to do if ClassNotFoundException occurs when starting Tomcat
What to do if rails server can't be stopped
What to do if TextToSpeech doesn't work on Android 11
What to do if an ActionController :: UnknownFormat error occurs
What to do if password authentication fails in Docker/Postgres
Until you push to Github
What to do if you get a wrong number of arguments error in binding.pry
What to do if you can't get the text of an element in Selenium
What to do if you get a NoClassDefFoundError when trying to run eclipse on Java9
What to do if you get the error Couldn't find Item without an ID
What to do if you can't find your API key after deploying to Rails heroku
What to do if you get a port error when docker-compose up on Mac
What to do if you cannot execute with the command "Java package name / class name"
What to do when you launch an application with rails
What to do if audio is not available on discordrb
What to do if FacesMessage is set but not displayed
What to do if the adb command cannot be executed
What to do if mysql2 gets a bundle install error
[Java] [Spring] What to do if you cannot Autowire with Type Mismatch after annotating Spring Security
What to do if you enable UFW on Ubuntu VM on GCP and you can't connect to SSH
What to do if you don't see the test code error message in the terminal console
[Rails] What to do if you accidentally install bundle in the production environment in your local environment
What to do if you change the Listen Address from the settings screen with Mattermost docker
What to do if you installed Ruby with rbenv but the version does not change
What to do if you get a "Cannot Pull Container Error" when starting ECS ​​Fargate
[Rails] What to do if you can't get an error message with the errors method
What to do if you get a "302" error in your controller unit test code in Rails
[Swift5] What to do if you want to commit files to github but there are too many