将项目添加到git上的步骤
来源:互联网 发布:社交软件英语翻译 编辑:程序博客网 时间:2024/05/17 23:34
做个记录备份也给其他的道友一个指引,若有错误请联系我一起讨论,谢谢!
1、在git 上创建项目的仓库
2、在终端中进入本地项目文件夹中
命令行 :cd 你的工程文件
3、初始化 git
命令行: git init
4 、 命令行:git add .
5、配置账号信息
命令行:
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
6、 上传日志
命令行:git commit -m "first commit"
7、添加远程git库地址
命令行:git remote add origin 项目仓库地址
8、上传项目
命令行:git push origin master
到这个本地项目就已经上传到git上了
若步骤8出现问题 问题如下
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'gitxxxxxxxxxxxxxxx.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
解决办法
9、上传本地缓存
命令行: git pull origin master
这个步骤成功之后 再继续第八步则可以成功上传项目了
- 将项目添加到git上的步骤
- 新建项目添加到git上步骤
- 新建项目添加到git上步骤
- 新建项目添加到git上步骤
- 工具使用--新建项目添加到git上步骤
- 将项目Demo上传到Github上的操作步骤
- 将已有的项目添加到git
- git 将本地项目添加到Github
- git将本地项目添加到Github
- ubuntu将svn项目迁移到git步骤以及遇到问题的解决方案
- Git--将已有的项目添加到github
- Git--将已有的项目添加到github
- git(一) 将本地项目推送到github上
- 使用git命令将本地项目上传到Gitlab上
- windows 使用git 将项目部署到linux上
- 使用git将项目代码上传到gitHub上
- 如何使用git命令将项目部署到GitHub上
- 将Eclipse中的项目,添加到GitHub上
- 层叠上下文 z-index
- .net webservice中如果dataset中有null值会导致生成的XML缺少字段节点
- Java 学习笔记(0x0E) 异常处理
- 种草&&拔草.......人生就是酱紫
- 一、zookeeper源码阅读建议
- 将项目添加到git上的步骤
- http协议请求行,状态行,响应状态行
- CVTE校招嵌入式经历
- webstorm 11
- Java服务端推送和web端推送——GoEasy免费推送服务
- Getting Started with Strange IoC
- Ubuntu 14.04快速安装ycm
- npm安装包安装时出现的问题
- ThinkPHP3.1.3配置项目