赞
踩
提示:你本地的项目目录里要记得添加.gitignore忽略文件,免得把一些无用的文件提交
,内容如下,可直接粘贴:
# Created by .ignore support plugin (hsz.mobi) ### Java template # Compiled class file *.class # Log file *.log # BlueJ files *.ctxt # Mobile Tools for Java (J2ME) .mtj.tmp/ # Package Files # *.jar *.war *.nar *.ear *.zip *.tar.gz *.rar *.iml # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* *.iml */target/ *target */src/docs/asciidoc/
在远程gitlab上创建新项目springcloud-001,默认分支为main。
cd springcloud-001
git init
git add .
git commit -m 'springcloud001项目初始化'
git remote add origin 你的远程库地址
如:git remote add origin git@gitlab.com:springcloud5521407/springcloud-001.git
如果提示 fatal: remote origin already exists(远程来源已经存在)
可以先git remote rm origin
(删除关联的origin的远程库),重新git remote add origin 你的远程库地址
git pull --rebase origin master
git push -u origin master
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。