一、安装git客户端
#yum源方式安装 yum -y install git
二、配置git客户端
git config --global user.name "xxx" git config --global user.email "yyy"
三、如果是创建新的repository
git clone [email protected]${gitaddr}:${username}/${projectname}.gitcd ${projectname} touch README.md git add README.md git commit -m "add README" git push -u origin master
四、如果是将已存在的项目路径转为repository
cd existing_folder git init vim .gitignore vim README.md git remote add origin [email protected]${gitaddr}:${username}/${projectname}.git git add . git commit git push -u origin master
《完》
时间: 2024-10-09 01:57:27