Download presentation
Presentation is loading. Please wait.
Published byGlenna Cahyadi Modified over 6 years ago
1
Convert an Eclipse Project to a Git repository and push up to GitHub
2
Navigate the Eclipse project and open a gitBash window
Open the project folder inside of the Eclipse Workspace Workspace has .Metadata and project folder in it Project folder has .classpath .settings src etc Open gitBash in that folder For Windows: right click in file explorer inside the open folder pane.
3
Convert folder to git repository
Add an empty .gitignore file using the command: git touch .gitignore Open .gitignore in a text editor and edit it as required by the project file structure
4
Example .gitignore file
# Ignore everything * # But not these files... !.gitignore !src !src/ !src/** !libs !libs/ !libs/** !Maps !Maps/ !Maps/** !*.txt !*.md # MAC HIDDEN FILES .DS_Store This example starts by ignoring everything. Files and folders that are to be tracked are included by putting the ‘!’ before the descriptor. This tells git to not ignore these files/folders
5
Initialize the folder to convert to a repository using >git init
This will add the .git hidden folder to the project
6
Convert Project folder into Git repository
git init add a .gitignore (edit the .gitignore) git add . git commit -m “first commit” Make an empty repository on GitHub Push project upstream
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.