In class demos for section A01
If you have an existing Eclipse project you like to add to your new GitHub repository:
-
Open Eclipse and in the Project Explorer view, right-mouse click the project and delete the project but do NOT delete the contents on disk
-
Open a Terminal and clone your remote GIT repository to your local machine:
cd ~/git/ git clone https://github.com/DMIT-2015/dmit2015-winter2019term-exercises-yourUserName.git mv -v /home/dmit2015/eclipse-workspace/DynamicWebProject ~/git/dmit2015-winter2019term-exercises-yourName
-
Open Eclipse and in the Project Explorer view, right-mouse click on the project and select "Team | Add To Index"
-
In Project Explorere view, right-mouse click on the project and select "Team | Commit..."
-
In the GIT Staging view, type in a Commit Message then click "Commit and Push..."
If you have an existing Eclipse project that is already using a GitHub repository:
-
"Team | Share Project..."
-
Click Create button. Change directory to "/home/dmit2015/git/exercises-repo". Click Finish. Click Finish.
-
Open a Terminal and type:
git add --all
git commit -m "initial commit"
git remote add origin https://github.com/DMIT-2015/dmit2015-winter2019term-exercises-yourUserName.git
git pull origin master --allow-unrelated-histories
git push --set-upstream origin master