一、安装git客户端
#yum源方式安装yum -y install git
二、配置git客户端
git config --global user.name "xxx"git config --global user.email "yyy"
三、如果是创建新的repository
git clone git@${gitaddr}:${username}/${projectname}.gitcd ${projectname}touch README.mdgit add README.mdgit commit -m "add README"git push -u origin master
四、如果是将已存在的项目路径转为repository
cd existing_foldergit initvim .gitignorevim README.mdgit remote add origin git@${gitaddr}:${username}/${projectname}.gitgit add .git commitgit push -u origin master
《完》