Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsRenaming Eclipse project didn't rename folder in local git repo
https://www.eclipse.org/forums/index.php/mv/msg/595366/1185172/#msg_1185172
I finally resorted to semi-manual surgery on the local git repo, by doing "git mv oldname newname". This fixed the name in my local git repo and gave me changes to commit, but this now messed up my Eclipse project. At this point, I just deleted the project (not the contents) and reimported projects from the repo, which recreated the project with the correct name.
Is there a better way I could have done this?]]>David M. Karr2013-11-13T23:32:24-00:00Re: Renaming Eclipse project didn't rename folder in local git repo
https://www.eclipse.org/forums/index.php/mv/msg/595366/1185640/#msg_1185640
David M. Karr wrote on Wed, 13 November 2013 18:32
I have a Maven project that I shared with a git repo. At one point I decided I needed to rename the project and artifact. I renamed it in Eclipse and it looked fine. The project name changed, and it changed the artifact name. However, it didn't change the folder in my local git repo. [...]
IMHO thats not an EGit issue, if you create a project outside the workspace (which is recommended for Git) and rename it within Eclipse it won't rename the system folder. Also the project name is independent from the project folder itself. It's just a name in a configuration file (.project for Eclipse). But I understand that it can be confusing ending up with a name different from the folder containing all the source files. So, renaming at Eclipse level, soft deleting the project(remove w/o deletion), renaming the folder at the system level and finally reimport it into Eclipse seems to be your best option.
]]>na na2013-11-14T07:02:24-00:00Re: Renaming Eclipse project didn't rename folder in local git repo
https://www.eclipse.org/forums/index.php/mv/msg/595366/1188633/#msg_1188633
If I import projects from a git repo, then there's an assumption that the project name is the same as the folder name in the git repo. I can see the possibility that someone might want to have more control over that (allowing different names), but I would assume that in most cases the names should stay equal. If I change the Eclipse project name, I think it's very likely that someone's going to want to change the git repo folder name, so the tool should make this the default, or make it easy to do from Eclipse.]]>David M. Karr2013-11-15T18:46:17-00:00Re: Renaming Eclipse project didn't rename folder in local git repo
https://www.eclipse.org/forums/index.php/mv/msg/595366/1189911/#msg_1189911
]]>na na2013-11-16T09:44:37-00:00Re: Renaming Eclipse project didn't rename folder in local git repo
https://www.eclipse.org/forums/index.php/mv/msg/595366/1191992/#msg_1191992
> I have a Maven project that I shared with a git repo. At one point I decided I needed to rename the project and artifact. I renamed it in Eclipse and it looked fine. The
> project name changed, and it changed the artifact name. However, it didn't change the folder in my local git repo. I couldn't do a "commit" because it didn't think there
> were any changes to commit.
>
> I finally resorted to semi-manual surgery on the local git repo, by doing "git mv oldname newname". This fixed the name in my local git repo and gave me changes to commit,
> but this now messed up my Eclipse project. At this point, I just deleted the project (not the contents) and reimported projects from the repo, which recreated the project
> with the correct name.
>
> Is there a better way I could have done this?
Use Refactor > Move to move the project to a new path.
-- robin]]>Robin Rosenberg2013-11-17T10:07:36-00:00Re: Renaming Eclipse project didn't rename folder in local git repo
https://www.eclipse.org/forums/index.php/mv/msg/595366/1456552/#msg_1456552
Can you please explain me how to refactor eclipse project. I had done it through eclipse, but the pom.xml isn't changing.
Can you please tell me in detail the steps involved in this process.
]]>naresh kumar2014-10-30T13:30:01-00:00Re: Renaming Eclipse project didn't rename folder in local git repo
https://www.eclipse.org/forums/index.php/mv/msg/595366/1457962/#msg_1457962
> Hi David,
> Can you please explain me how to refactor eclipse project. I had done it through eclipse, but the pom.xml isn't changing. Can you please tell me in detail the steps
> involved in this process.
Eclipse doesn't understand maven pom files. You have to edit those manually.