Git Commands
From Eclipse locate the Project directory by right-clicking on the project folder and then selecting Properties from the menu.
- sign into github.com
- create new repository: MyFirstProject
- open the terminal on your pc and change to the project directory
- run the following commands at the prompt
git init git remote add origin https://[email protected]/dave45678/MyFirstProject git config -l git add --all git commit -m "commit message" git push -u origin master git status
The project files should now be on github
After you make changes to your project:
git add --all
git commit -m "commit message"
git push
git status
Notes: if origin already exists then use
git remote set-url origin https://[email protected]/dave45678/MyFirstProject (Links to an external site.)
You can create a file in your project directory called .gitignore
You can copy an example of .gitignore from http://bit.ly/GitIgnore (Links to an external site.) and use that
For more details on creating .gitignore see https://help.github.com/articles/ignoring-files/ (Links to an external site.)