dm: rewrite git repository init part

It's not working while init just before use.
dm: git push: fix push bugs