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

Captcha Click on image to update the captcha.

Have an account? Sign In Now

Sign In

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

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Tech Answered Logo Tech Answered Logo
Sign InSign Up

Tech Answered

Tech Answered Navigation

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

Mobile menu

Close
Ask a Question
  • Home
  • About Us
  • Blog
  • Contact Us
Home / Questions /Q 1626
Next
Answered
kiran kumar85
kiran kumar85

kiran kumar85

  • Pursuing my Graduation,Tech Geek
  • 168 Questions
  • 80 Answers
  • 1 Best Answer
  • 146 Points
View Profile
  • 3
kiran kumar85
Asked: April 21, 20212021-04-21T08:16:44+05:30 2021-04-21T08:16:44+05:30In: Internet Of Things

how to delete unpublished git commits and get rid of them permanently?

  • 3

I have some unpublished git commits in our current project. how to delete unpublished git commits and get rid of them permanently?

broken commitcommitdelete unpublished git commits and get rid of them permanently?git commithow to delete unpublished git commitshow to delete unpublished git commits and get rid of them permanently?how to delete unpublished git commits and get rid of them permanently? 2021
  • 2
  • 1,498
  • 0
  • 0
Answer
Share
  • Facebook

    Related Questions

    • how to resolve merge conflicts in git

    2 Answers

    1. Priyanka Chakraborty

      Priyanka Chakraborty

      • India
      • 10 Questions
      • 10 Answers
      • 0 Best Answers
      • 43 Points
      View Profile
      Priyanka Chakraborty
      2021-05-02T11:54:52+05:30Added an answer on May 2, 2021 at 11:54 am

      To Delete the most recent commit:

       

      git reset –hard HEAD~1

       

      To Delete the most recent commit, without destroying the work you’ve done:

       

      git reset –soft HEAD~1

       

      Note :Make sure these commits have not been pushed.

      git reset –hard <commit hash number>

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    2. kushwanth

      kushwanth

      • India
      • 9 Questions
      • 13 Answers
      • 2 Best Answers
      • 76 Points
      View Profile
      Best Answer
      kushwanth
      2021-05-02T12:46:23+05:30Added an answer on May 2, 2021 at 12:46 pm

      Yes, you can delete unpublished git commits:

      To remove the last commit from git, you can simply run git reset –hard HEAD~1.

      If you are removing multiple commits from the top, you can run git reset –hard HEAD~1 to remove the last two commits.

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    Leave an answer

    Leave an answer
    Cancel reply

    Browse

    Sidebar

    Ask A Question

    More Questions

    • dynamicapps5

      what jewelry to wear to a wedding as a guest

    • dynamicapps5

      What kind of earrings should round faces wear

    • kiran kumar85

      How much did amazon pay for audible in india

    • arunraj503

      How can I get Flipkart Plus membership for students?

    • kiran kumar85

      Does meesho refund money in cash on delivery without bank

    • imona

      Flow Imaging Microscopy Market Forecast To 2027| Demand, Key participants,

    • dynamicapps5

      handmade christmas card ideas this year

    • S R Shanchu

      how to delete all post on facebook in single click?

    Stats

    • Questions 1,992
    • Answers 2,102
    • Posts 12
    • Best Answers 73

    Related Questions

    • krinal patel

      how to resolve merge conflicts in git

    Explore

    • Home
    • Communities
    • Questions
      • New Questions
      • Trending Questions
      • Must read Questions
      • Hot Questions
    • Polls
    • Tags
    • Badges
    • Users
    • Help

    Footer

    Recent Comments

    • muller on how to solve export problem in kinemaster
    • muller on how to solve export problem in kinemaster
    • muller on how to solve export problem in kinemaster
    • AaronBlackburn on why can’t i find my message requests on instagram
    • shree on How to use philips citrus press juicer 25 watts Demo
    Ask A Question

    Archives

    Tags

    laptop buying guide (1) limit google news notifications (1) printer buying guide (1) stop google news notifications (1) turn off google news notifications (1)

    Social media

    © 2023 @ Techanswered.com.
    Terms, Privacy policy & Sitemap.

    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.