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 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

1 Comment

You are absolutely right. If I initiate a pull request, it seems that Github 'knows' that /orig/path/File.java -> /new/path/File.java

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.