Sunday, July 1, 2012
how to create git repository from existing source code
1. Setup an empty repository. If you already have a repository skip to step 2
% git --init bare
2. Add git to your source code directory
% cd myProject
% git init
% git add . #adds everything
% git "initial commit" commit
3. add remote repository created in step 1
% git remote rm origin
% git remote add origin
can be ssh://gitUser@remoteHost/path/to/repository
4. git push origin master
Subscribe to:
Posts (Atom)