Deleting committed in files in local eclipse - eclipse

I was having trouble getting my eclipse set up for a new project, so I copied another project over and deleted the existing files.
However the commit history is saved for all of the old files. Where do I go to delete this commit history?
Using Eclipse Neon 3

Right-click on the project, Team -> Disconnect. This will completely remove any revision information.
To create a repo with the contents of a fresh project, do the above, then close eclipse and via the command line in a terminal execute git init in that project's top folder. Open eclipse and the project is in a fresh repo without any history.

Related

Eclipse project been ignored when trying to commit to Git Repository

I am using eclipse and EGit plugin.
I pressed by mistake Team -> Ignore for my whole project in eclipse and now is not recognising my changes and I can't commit.
How can I solve it?
I'm not sure you can undo that through the UI, so try searching for a .gitignore file in your workspace or local repository.
References to your project files should be in it, edit the file, remove references and save it.

Target location for project " " already exists, can not move project

when I am trying to share my project with git repository getting exception like this
"Target location for project " " already exists, can not move project"
Writing an answer because I tried many options suggested in many similar questions but none worked. Then I did it manually with following steps that worked, and these steps will work for any Eclipse version:
Goto the Eclipse workspace in the file system and copy the project from there and paste it in some other location in your file system. This will serve as a backup.
Goto your Eclipse and then right click on the project and click delete. You can say delete from the file system because you've already taken a backup in step1.
Goto your Git repo in the file system and paste the project folder at the location you want (may be inside another folder with .project file doesn't matter).
Then come back to your Eclipse and then File->Import -> Import from Git -> Local repo -> Select the Git local repo where you've pasted the project in step 3 and then import it as usual.
As I said earlier, this will work for any Eclipse version.
This situation will happen if you already have a Project of the same name in your local git repository. Sharing a project means steps to commit your project into your local git repository and from there it as ORIGIN will be pushed to Master (Remote). (You are creating again with a new eclipse IDE, or that project was deleted from IDE but committed to local repository in the past).
Solution is simple:
Remove the project from your local git repository.
C:\Users\username\git on windows operating system. (If this not possible then next step)
Rename the project in your IDE (Better recreate a project with same code but with new Project name) that you want to share: repeat the process of sharing on Eclipse IDE.
You may optionally want to recreate after dropping the remote repository(master), if something is already pushed from last push of project, so that everything is clean. You may visit the git repository to confirm it.
In my case this was caused by an extraneous .project and related Eclipse files at the top of the git repository folder. The files were created by Eclipse due to incorrect folder specified on Import of the other projects in the repo.

Eclipse Kepler with Subclipse not picking up newly added files

my Mac is running:
Mavericks 10.9.3
subversion 1.8.9
subversion-javahlbindings 1.8.9
Eclipse Kepler SR2 with Subclipse 1.10
For some reason, when I'm working on a Project and go to Team > Commit
Subclipse will detect changes in existing files and allow me to commit, but it doesn't list added files.
In order to commit added files I have to use Team > Synchronise with Repository > Right-click on file tree > Commit
In the previous versions of svn/subclipse, added files were automatically picked up, and got committed straight from the Team > Commit dialog.
I've tried configuring Subclipse to use each oif the JavaHL and SVNKit options, but neither picks up newly added files.
Can anyone suggest what might be wrong?
In svn, new files must be explicitly added (using the svn add command) before they can be committed. Eclipse's Synchronize view does that for you, since it has shown you the files that need to be added and it presumes that you "approve" of the new ones. But using the Commit command directly is just calling svn commit without svn add, so the new files are not included.
When you create new files with other editor or copy/paste in finder, some times SVN doesn't detect.
You can try refresh the Eclipse project, just click in your project select "Team -> Refresh/Cleanup" from context menu, then the files will appear in Team Synchronizing View.
Works for me.

Start using Eclipse GIT with an existing project ... project files get moved

Yesterday I wanted to start using Eclipse eGIT on an existing project following the instructions on http://www.vogella.com/articles/EGit/article.html
This tutorial suggests to have the git repository outside of the workspace, and I followed this suggestion.
After the step "5.5. Using the Git Staging view for the initial commit" I committed my initial commit. Then I continued editing one of my source files that was still open. But when I tried to save my changes, Eclipse complained that the source file was no longer there.
Then I checked both my workspace and git folder, and the project files were only in git. This is mentioned nowhere in the tutorial. Is this normal behavior?
Even more surprising: In order to continue working normally with my already open files, I copied the project subfolder from .git back to the workspace folder. And now everything seems to be fine. My changes are reflected in workspace folder as well as in "Unstaged Changes" in the Git Staging view and in git folder.
Is this expected behavior?
I found out that the files really get moved. I needed to close all the open project files and then open them from package explorer again (which will open the files from git repository).

Eclipse, Git pull to existing repository, where are new projects

Using Eclipse 4.21 + Egit 2.20 on Linux, all components are up to date. The Eclipse workspace is linked to a local repository stored outside of the workspace folder. The remote repository is on GitHub.
After a pull (either made within Eclipse or outside using git cmdline), my friend and I can see each other updates or new files in existing projects. But each of us cannot see NEW project added by the other developer. The new project files are on GitHib and are actually saved in the local working folder after the git pull.
No matter how many times I refresh the package explorer view or exit/restart Eclipse. The new project doesn't show up in Eclipse package explorer. Each time, a manual "import existing project" is necessary.
Is it because I added .metadata is the .gitignore file at the root of the repository? More importantly, what is the recommended practice so that new project, deleted projects which are committed to the remote repository to sync automatically in Eclipse package explorer after a git pull?
Thanks in advance for any help.
You are using it as it is designed to be used. The concepts of the Eclipse Workspace and folders in your Git repository don't link that way automatically, just as creating a new directory in the workspace directory doesn't automatically make a new project show up in the UI.