2014年1月11日 星期六

[GIT] How to clone the project from git server


At the beginning



# Server

mkdir <Project-Name>

mkdir HAPPY

cd HAPPY

git --bare init



# Client

mkdir <pick up a name>

mkdir good

cd good

git init

touch abc.txt



git add . (Using git to add file)

git commit -m "This is first time  (Commit the file to local git)



git push ssh://<username>@<remote's IP>/<folder of repository> (Push to remote server)

git push ssh://freeman@127.0.0.1/home/freeman/happy master



# Client -- Clone file to another folder

mkdir ha

cd ha

git clone ssh://freeman@127.0.0.1/home/freeman/happy



At the second

comit the code change



git commit -a -v -m "command code change"







Reference :



Related Posts:

0 意見:

張貼留言