在LayaAir IDE中 使用git 发布代码到码云

来源:互联网 发布:linux如何创建目录链接 编辑:程序博客网 时间:2024/06/05 09:23

按照步骤一步一步进行

1. 安装LayaAir IDE 很简单不描述 我安装的是1.7.12 beta 版本

2. 已经安装了Git  如果官网下不来 可以在360软件中搜索git 即可下载 我的版本号是2.8.0

3.然后在CMD git --version 注意 命令行两个横杠 提示版本 表示安装成功 




4. 然后配置全局

git config --global user.email "youremail@163.com"
git config --global user.name "yourname"

到这里 git 基本上配置完毕了

5. 在码云建立一个仓库

直接百度码云创建一个账号,并新建一个私有工程 并记录下地址

类似 https://gitee.com/xxxx/xxxx

6.链接这个仓库

使用LayaAir 链接到码云 在终端中输入

git remote add origin https://git.oschina.net/xxxx/xxxx.git  
其中的地址 换成你自己的
git push -u origin master
会提示用户名密码 
输入后看到
From https://gitee.com/xxxx/xxxx * branch            master     -> FETCH_HEADAlready up-to-date.

代表已经成功链接到远程的仓库


7.发布代码

切换到git功能窗口 Ctrl + Shift + G

然后初始化本地 确定后 发布  


如果不想每次都输入密码  可以输入一下指令

git config --global credential.helper store



原创粉丝点击