Using Git - SEV-Hyperion/SpaceInvaders GitHub Wiki
Before anything, create an account on GitHub.
Tip
|
Use your real name or a very descriptive one as alias. It is going to be your "face" on one of the most important webpages for developers. |
Then, create a repository or check if you are part of the group you are going to to be using.
Open Eclipse and get to your workspace of desire.
Important
|
Be sure there are no projects with the same name as the ones you are about to import! |
Copy the URL from the repository web. Go to File>Import…>Git>Projects from Git Choose Clone URI.
Tip
|
Always copy the URL before opening the import wizard, so it automatically fills in all the data! |
Click next. Select the branch you are going to work on, usually Master. Decide where you want the Project to be stored. Next. Import as general project. And you are done!
Now, you start writing/deleting code and want to upload your work. There are lots of different commands you can use through Right click>Team, but I’ll focus on the most important.
This is the Holy Grail of Git. Press this button and you will be presented with a simple interface showing the files that were modified since last commmit, asking you to tick them and some words to describe what you have done.
Important
|
Be very descriptive when writing your commits, as you might need to read them later to recover from errors. |
Then you can press "Commit" or "Commit & Push". Both sabe your data but only the second will upload the files to GitHub (useful in case you are working at home and don’t want to show your changes until getting the solution).