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

  • SEARCH
  • Home
  • 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 6563491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:51:30+00:00 2026-05-25T13:51:30+00:00

So a long time ago I added a folder abc with a group of

  • 0

So a long time ago I added a folder abc with a group of files in it to my project and made a commit with revision xyz.
After many commits someone has erased the folder with git rm -r abc.
After this there has been a lot of commits as well.

Now I need to get back the folder abc. I do

git revert xyz

After this I can find folder xyz but not all of the files that were added in the commit xyz are present.

What am I doing wrong? I dont want to do reset because I want to keep the history between commit xyz and the present.

  • 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-05-25T13:51:30+00:00Added an answer on May 25, 2026 at 1:51 pm

    git revert xyz does not bring your code back to the state in which it was at revision xyz – it creates a new commit that undoes whatever was done in xyz. You could try git cherry-pick --no-commit xyz, which will replay the changes that were done in xyz (if you leave out --no-commit, it will automatically become a new commit, but maybe you don’t want everything that was done in xyz).

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

Sidebar

Related Questions

I had a website made for me a long time ago, and the programmer
As you may know not long time ago facebook added several new features. One
I have modeled an AJAX search after this example a long time ago. I
My site: FIFA Encyclopedia A long time ago I made some big changes and
I started this project a long long time ago when I was just beginning
I've seen a long time ago a tip to easily add a silverlight project
Long time ago, the Game Developer magazine published an article about ID Software and
A long time ago I had an apple ][ . I remember the command
A long time ago when I was a young lat I used to do
A long time ago I saw this trick in Ruby. Instead of doing (for

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.