使用git将本地代码提交到码云上去

码云为开源中国基于git的代码网络托管平台,将代码托管、开发与项目管理工具融为一体。
今天第一次将自己的web项目代码上传至码云,过程中遇到一些问题,此处进行总结与过程的演示:
当我们在码云上创建好项目后,结构如图所示:

 代码开发完成之后发现代码无误之后就需要将他提交到码云上去,

首先需要找一个文件夹,

鼠标右键执行git clone

然后再将自己代码copy进去,

@cxyy MINGW64 /d/学习内容/新建文件夹/springboot_activeMq (master)
$ git init
Reinitialized existing Git repository in D:/学习内容/新建文件夹/springboot_activeMq/.git/

@cxyy MINGW64 /d/学习内容/新建文件夹/springboot_activeMq (master)
$ git remote add origin https://gitee.com/chenxiufen/springboot_activeMq.git
fatal: remote origin already exists.

@cxyy MINGW64 /d/学习内容/新建文件夹/springboot_activeMq (master)
$ git remote add origin1 https://gitee.com/chenxiufen/springboot_activeMq.git

@cxyy MINGW64 /d/学习内容/新建文件夹/springboot_activeMq (master) $ git add Nothing specified, nothing added. Maybe you wanted to say 'git add .'?


@cxyy MINGW64 /d/学习内容/新建文件夹/springboot_activeMq (master) $ git add. git: 'add.' is not a git command. See 'git --help'. The most similar command is add

按照如下命令执行就可以了,这是第一次提交,如果将代码拉到idea中操作就不是这样了

原文地址:https://www.cnblogs.com/xiufengchen/p/10329722.html