Eclipse GitHub Repo
Creating New Repository
- Launch Github Desktop
- File > New repository
- Leave Default Path alone (E:\GitHub Repo). Just type in a name then Create Repository.
- After you create repository the new path will be E:\Github Repo\ProjectName
- Quickly access the new repository by doing... Repository > Show In Explorer in Github Desktop
- This is where you will be copying your eclipse source folder if it already exists.
- This is where you should create your new Eclipse project if it is a new project.
- Place a .gitignore file in E:\Github Repo\ProjectName
Contents of .gitignore
5.1 Creating New Eclipse Project
Uncheck default location. Choose E:\GitHub Repo\The New Repo Folder. Then finish.
5.2 Importing Old Eclipse Project
In eclipse right click on the existing project. Then Show In > System Explorer.
Copy the project folder and paste it in the folder in step 4.1.
Your repository in step 5.1 should look like this now.
- File > Import > General > Projects from Folders or Archives...
- Locate the new project you copied in E:\Github Repo
- Done. Finished importing
Finally committing
If you are importing, Make sure you commit first. Then in Eclipse. Delete the old project.
Now type in a summary in the GitHub app. And an optional description of the changes. Then press Commit.
After you commit you have to Publish. in the top right.
Any future commits have to be Pushed. also in the top right (it isn't called Published).
Checking Out an Older Version
In GitHub Desktop. Click on your repo. Repository -> Open in Command prompt.
git log // allows you to see all your commits
git checkout commitnumber here // lets you go back to an older commit
// example: git checkout 92753a2c847b035e3fa11a182a117247e5098a74
// now check for changes in eclipse.
// to go back to the main branch do
git checkout main

