Bharatvaj Hemanth
October 18, 2016
One of the most interesting thing to do for a programmer whether he is student or professional is to team up with other guys in school/college/work and create a project. That’s the real fun.
Now you gathered a team, where’s the venue? That’s where Git comes. It provides a fully featured code sharing environment making our life way more easier.
While knowing Git commands might be helpful… there is no necessity.
So without knowing the commands, how can we manage them? Say hi, to our guy : GitHub
GitHub provides all the front end to manage the operations in Git. Now, I am not going to dive deep into GitHub, for the sake of keeping this instructive simple. Just create a account there and we are good to go. Don’t forget to verify your email address.
Go to Control Panel->System->Advanced System Settings->Environment Variables
Next thing you have to do is to install Eclipse. If you already have one, make sure you have the latest version installed.
Here comes the hard part (not really…)
Open Eclipse, create a project or open existing project which you want share.
Go to Window->Preferences->General->Network Connection->SSH2->Key Management
You have to deal with two reposotories for the same project, one is the local repository(you have it with you) and the other is the remote repository(which is on the web). And they are not automatically synchronized. So, we have our local copy here, lets update it to the servers.
To make our local project a local repository,
Select the project you want to share, right-click->Team->Share Project
Now, you can see your project gets associated with EGit. But you will see “[NO HEAD]” kind of description.
To resolve this, goto right-click the project->Team->Commit…
To view the repositories,
Goto Window->Show View->Other->Git->Git Repositories
In the Git Repositories menu,
Open Eclipse, right click the project you want to commit(a fancy name for upload) and then select Team->Commit… or use the shortcut Ctrl + #
The changes you have made should be entered in Commit message which shows others the changes you have done.
Click “Commit and Option” to upload the files and sync the local repository with server or click “Commit” to inform others that you’re working on the selected files.
That’s all there is to it… Happy Coding!