1、Idea 打开需要上传的项目
 
2、先在本地创建一个git仓库
VCS --> Import into Version Control --> Create Git repository
mac 上使用 idea  上传项目代码到阿里云git上
 mac 上使用 idea  上传项目代码到阿里云git上

 

 

mac 上使用 idea  上传项目代码到阿里云git上
 
3、登录阿里云gitCode https://code.aliyun.com
然后按步骤创建项目
mac 上使用 idea  上传项目代码到阿里云git上
 mac 上使用 idea  上传项目代码到阿里云git上

 

 

mac 上使用 idea  上传项目代码到阿里云git上
 
 
4、打开控Mac制台
cd 到对应项目目录 : cd /Users/xxx/projectName
mac 上使用 idea  上传项目代码到阿里云git上
 mac 上使用 idea  上传项目代码到阿里云git上

 

 

然后执行指令 ,关联远程创建的git项目地址 (本地项目名 和 git 项目名称 保持一致
git remote add origin git@code.aliyun.com:/projectName.git
执行命令,推送代码到远程远程
git remote add origin  远程地址(远程仓库的git地址)
git pull origin master  (创建本地分支master)
 mac 上使用 idea  上传项目代码到阿里云git上

 

 

mac 上使用 idea  上传项目代码到阿里云git上
然后IDEA上点击提交,Commit and Push就好了
mac 上使用 idea  上传项目代码到阿里云git上
 mac 上使用 idea  上传项目代码到阿里云git上

 

 

 
5、查看远程提交代码
mac 上使用 idea  上传项目代码到阿里云git上

 

 

mac 上使用 idea  上传项目代码到阿里云git上
 

相关文章: