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...

Have Questions? Post them here!
- 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
- [git] fatal: your current branch 'main' does not have any commits yet - Git
- Convert Instant timestamp into LocalDateTime Java Code Example - Java
- Check Wifi Connection static Android Programming - Android
- Command to check Last Login or Reboot History of Users and TTYs - Linux
- macOS Big Sur compatible Macs List - MacOS
- How to check if an element is hidden using jQuery code? - jQuery
- Shortcuts: How to Toggle Word Wrap in Visual Studio Code (VS Code) - Shortcuts
- How to List the SHA Digest of Docker Images - Docker