Convert an Eclipse Project to a Git repository

  • Slides: 6
Download presentation
Convert an Eclipse Project to a Git repository and push up to Git. Hub

Convert an Eclipse Project to a Git repository and push up to Git. Hub

Navigate the Eclipse project and open a git. Bash window Open the project folder

Navigate the Eclipse project and open a git. Bash window Open the project folder inside of the Eclipse Workspace has. Metadata and project folder in it Project folder has. classpath. settings src etc Open git. Bash in that folder For Windows: right click in file explorer inside the open folder pane.

Convert folder to git repository Add an empty. gitignore file using the command: git

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

Example. gitignore file # Ignore everything * This example starts by ignoring everything. Files

Example. gitignore file # Ignore everything * 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 # But not these files. . . !. gitignore !src/** !libs/** !Maps/** !*. txt !*. md # MAC HIDDEN FILES. DS_Store

Initialize the folder to convert to a repository using >git init This will add

Initialize the folder to convert to a repository using >git init This will add the. git hidden folder to the project

Convert Project folder into Git repository git init add a. gitignore (edit the. gitignore)

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 Git. Hub Push project upstream