Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7931681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:47:39+00:00 2026-06-03T20:47:39+00:00

I want to get rid of everything I did since my last commit, including

  • 0

I want to get rid of everything I did since my last commit, including the tables I created, so I did

git reset --hard HEAD
git clean -f -d

so this got rid of the migrations I created, but in the schema it looks like the tables are still there. I know I can just create new migrations to drop those tables, but I was just wondering for future references how I could reset to the last commit even on the database level.

Another reason why I would need to delete the tables in the database is because when I try to create migrations(models) to create the exact tables, it gives me an error and says they already exist. So if I were to push this to github and production, it would not create the tables since the migrations don’t exist. Thus, I think it is necessary for me to delete the created tables locally through some sort (preferably rolling back), and then re-create the migrations.

(I’m using PostGreSQl)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:47:41+00:00Added an answer on June 3, 2026 at 8:47 pm

    So I solved this temporarily, but probably not the most ideal way to do it.. I just created migrations to remove the tables, ran rake db:migrate, and then deleted the migrations. So this way it’s like it never happened.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to get rid of you tube play button you see on image,
I want to get rid of the timestamp in this returned string. I am
Say you just want to get rid of the changes you've made to one
In a nested WPF ToolBarPanel-ToolBar-Menu we want to get rid of the grip handle
So my string is something like BlaBlaBlaDDDaaa2aaa345 I want to get rid of its
I want to improve a small framework, and therefore I want to get rid
I have two issues in this google chart. I want to either get rid
I am trying to get rid of this: document.body.className = someclass; I want to
I have a UIViewController that has a XIB. I don't want to get rid
I want to create a canvas element and get it's context. I tried everything,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.