If you have a project on your Eclipse, on your local computer that is not version controlled and you realize that you should do it. Well, this is quick and easy!
- Step 1: Open Your Project in Eclipse
- Step 2: Right click on your project folder and select: Show in -> Terminal
- Step 3: Now in the terminal run the command: git init
Example:$ git init Initialized empty Git repository in /Users/code2care/eclipse-ws-bit-bucket/myapp/.git/
- Step 4: Now you should see that your project has the .git repository (Close your project and re-open if you do not see the repo)
$ ls -la total 16 drwxr-xr-x@ 8 code2care staff 256 Jan 11 15:14 . drwxr-xr-x@ 4 code2care staff 128 Jan 11 15:08 .. -rw-r--r--@ 1 code2care staff 386 Jan 11 15:08 .classpath drwxr-xr-x@ 9 code2care staff 288 Jan 11 15:14 .git -rw-r--r--@ 1 code2care staff 364 Jan 11 15:08 .project drwxr-xr-x@ 4 code2care staff 128 Jan 11 15:08 .settings drwxr-xr-x@ 3 code2care staff 96 Jan 11 15:08 bin drwxr-xr-x@ 3 code2care staff 96 Jan 11 15:08 src
Now you can commit your project to your local repository using Right Click on the project: Team -> Commit...

-
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to Eclipse,
- How to display hidden files in Eclipse (dot prefixed files)
- Convert existing code project into a git project using Eclipse
- How to enable line numbers in Eclipse IDE
- [Eclipse] Syntax error, annotations are only available if source level is 1.5 or greater
- Enable Spellcheck in eclipse workspace
- How to create a Git Project in Eclipse (Step-by-step)
- [Solution] Spring Tool Suite (STS) support for JSP (JAVA EE)
- How to Remove All Terminated Console tabs at once in Eclipse
- Eclipse Java: Multiple markers at this line error
- Compare Current and Previous Versions of Same File (Local History) in Eclipse
- Eclipse : Workspace was written with an older version of the product and will be updated
- How to Save Eclipse console logs in external log file
- Fix: Eclipse Cant Connect to any repository not Authorized Error GitHub
- How to remove unwanted Java imports in IntelliJ (alternative of eclipse Ctrl + Shift + O)
- How to Configure GitHub with Eclipse IDE in 2023
- How to use Content Assist in Eclipse IDE
- Enable Eclipse dark mode
- Fix: Eclipse Connection time out: github.com
- Java was started but returned exit code=13 [Eclipse]
- Java Decompiler Eclipse Plugin
- Add imports in eclipse shortcut key combinations
- Syntax error, parameterized types are only available if source level is 1.5 or greater [Java]
- [Eclipse] Enable or Disable print margin line
- Eclipse Error The JVM Shared Library JavaVirtualMachines does not contain the JNI_CreateJavaVM symbol
- How to reset Eclipse IDE Code Font
More Posts:
- npm WARN saveError ENOENT: no such file or directory, open /mnt/c/package.json - JavaScript
- Error: Safari quit unexpectedly. Problem Report for Safari - MacOS
- Python: Fix - TypeError: NoneType object is not iterable - Python
- Mac: Turn off Auto Capitalization of Words - MacOS
- Managed Metadata error - The data returned from the tagging UI was not formatted correctly - SharePoint
- Clear SFTP Prompt Screen on macOS Terminal - MacOS
- [Eclipse] Syntax error, annotations are only available if source level is 1.5 or greater - Eclipse
- Bash: Allow Command to Fail without exiting Script - Bash