Most of the tutorials out there for Eclipse and Git seem to assume that all you want to do is create a brand new project in eclipse, and then add that to a brand new git repository. I find it strange that the need to create new eclipse project in an existing git repository (i.e. in a new git repository that is set up to push/pull from a remote repository like, idk, github) doesn't appear after twenty minutes of googling/reading. So here are my instructions.
Eclipse + Git
On server
1. On server (say, a brand new ubuntu server machine that you just installed git on) create bare repository.
On local computer
2. create new project in eclipse
3. Team -> Share ...
3a. create new git repo
4. edit new git repo
4a. r-click on remotes -> create remote
5. configure for push first, so you can push to the remote and have something in it.
Yeah, sounds simple now. Imagine being me and always forgetting how you did it every other time.
Note: this is more for git beginners like me, who still use the local git repo more like a workspace, and behave as if the remote one is a centralized server, as if we were still using SVN. In my defense, at least I'm not using some disgusting shit like perforce.
P.S. best Git/Eclipse resource I could find: http://www.vogella.com/articles/EGit/article.html
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment