美文网首页
IDEA 使用git关联本地WEB项目

IDEA 使用git关联本地WEB项目

作者: 云顶天宫写代码 | 来源:发表于2017-11-09 09:58 被阅读0次

准备工作:

IntelliJ IDEA 2017.2.1

git的远程地址:例(https://gitee.com/dkzjd/base.git)

步骤1:建立本地Git仓库;

步骤 2: add之后,提交全部需要管理的文件到新建立的本地仓库master分支;

步骤3: 点击  + 号,添加https://gitee.com/dkzjd/base.git 


步骤4 :在Terminal 中 git pull origin master 或者使用工具栏上的按钮

(备注:如果出现更新失败的话,Can't update: no tracked branch 尝试使用命令

git branch --set-upstream-to origin/master master 应该就OK了

如果出现 refusing to merge unrelated histories 错误,尝试使用命令

git pull origin master --allow-unrelated-histories

)

步骤5:git pull origin master 

步骤6:使用.igonre 插件忽略.idea文件夹和target文件夹,如果装有该插件,通过File--new-如下图就可以创建git忽略文件

选中要忽略的文件,右键找到如下图操作,大功告成

相关文章

网友评论

      本文标题:IDEA 使用git关联本地WEB项目

      本文链接:https://www.haomeiwen.com/subject/usfpmxtx.html