I need to add the file to the repository and then commit it from my java project. I use 

Runtime.getRuntime().exec("C:\\Program Files (x86)\\Git\\bin\\sh.exe");


to start git but what should I do next?


Question: Why so many classes declared as abstract even it contain all defined methods?
Answer: A class can be declared as abstract for 2 reasons.  


It contains abstract methods
That class should not be instantiated.  


In magento's case most of the abstract classes fall in the second case.
Classes like Mage_Catalog_Model_Abstract and Mage_Core_Model_Abstract are never instantiated. They are just used as a common ancestor for other classes.
Just search in the code for extends Mage_Core_Model_Abstract.  

The "abstract" classes contain common behavior of all child classes but they don't actually do something without some configuration values.  

Let's take for example Mage_Core_Model_Abstract. This is a common model for all other models that map to one table (or more tables for the eav entities).  But the base class should never be instantiated.
For example you can call $model-&gt;save() on a child class because that one has a mapping to (at least) a table but you cannot call it on the abstract class. But the save method works the same for all the child models so no need to implement it in all the child classes.  

I hope I was clear enough.