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 8776947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:10:45+00:00 2026-06-13T19:10:45+00:00

I forked a repository which had a strange directory structure which I fixed as

  • 0

I forked a repository which had a strange directory structure which I fixed as follows:

Before:

/core/src/com/example/core/Core.java

/simulation/src/com/example/simulation/Main.java

After:

/src/com/example/core/Core.java

/src/com/example/simulation/Main.java

When I moved these directories around, I was completely new to Git and simply did a git rm on the old ones and a git add to the new ones.

I have since made many changes to the files and I would like to send a pull request to the original repository for the new structure and content.

How can I tell Git to retrospectively move (mv) the files so that it is obvious where the files came from?

  • 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-13T19:10:46+00:00Added an answer on June 13, 2026 at 7:10 pm

    A git mv filex is the exact same as git rm filex followed by git add new\location\filex.

    There is no reason you would need to retrospectively change it.

    Here is some more info on it

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

Sidebar

Related Questions

I have forked a private repository (an iPhone project) as follows: cd nameofdirectory git
Is it possible to 'fork again' in github? I had forked a public repository,
I'm working on a repository I forked in which the author took the dirty
I forked a repository on github (https://github.com/VimEz/ShowMarks -> https://github.com/mikeage/ShowMarks ) and pushed two changes.
I've forked a Mercurial repository, and now I want to pull the changes from
I forked a project a few weeks ago. The main repository is on a
I forked someone elses repository on Bitbucket and made some changes (and pushed them
I have forked the git repository of a project on Github and made my
Say someone clones repository A which results in repository B and then I clone
I forked a GitHub repository. Then I pushed some changes to my fork. Then

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.