android studio 新建项目导入到Coding远程仓库git

首先要配置环境变量  在path里添加    ;C:\Program Files\Git\bin     (这个是我的git的目录,根据自己的git目录添加)

本地创建项目并且在coding创建项目 之后 在as的Terminal(as最下方)中输入以下命令即可

git init
echo "# aa" >> README.md
git add README.md
git commit -m "first commit"
git remote add origin https://git.coding.net/yuLook/aa.git
git push -u origin master
git add . // 追踪新文件,并放到暂存区
git commit -m "first commit" //将文件纳入本地仓库
git push // 将本地仓库同步到远端仓库


Username for //github账号
Password for //github密码


以上完成之后 关闭as重新打开即可

纯手打 本人亲测两个项目可用

VCS---Import into Version Control---Create Git Repository (路径随意)

选中项目之后右键 GIT---add

Commit Changes---commit and push 

点击master  填写路径  

原文地址:https://www.cnblogs.com/yulook/p/5217405.html