In order to keep my software developments in line and keep access also from remote sides I decided to use git on one of my servers and use eclipse for the development itself. So to add or create a new repository I follow this steps:
– create new directory: mkdir <repo>
For convenience I use a naming as: repo-<section>-<subsection> (e.g. repo-php-project)
– change to the newly craeted directory: cd <repo>
– initailize a bare git repo: git init –bare
This will fill in a repo with the administrative stuff inside but without any further details. Those will come with the first clone/commit.
– clone the empty repo from within eclipse using the import function: Project perspective -> Import -> Git repository -> New Project
This will create a new project within eclipse based on the newly created git repo.
I periodically face the situation that I have uncommited changes on one computer when pulling from the master repo which leads to the error “Checkout conflicts with files: …”
The solutions is to:
– pull again from master/remote repo
– if the automerge function is successfull everything is OK, but if not:
– I manually edit the conflicting files (marked with red angle) and
– commit and push the changes made
Now the server/remote repo should be uptodate again