git初始化项目提交到码云
来源:互联网 发布:淘宝网宣纸 编辑:程序博客网 时间:2024/06/11 07:51
1在码云新建项目
2本地新建项目,包括readme.md,ignore这俩个文件
初始化仓库
git init
关联远程仓库
git remote add origin git@github.com:YotrolZ/helloTest.git
git add *
git commit —m"初次提交"
E:\mm\zdh>git push -u origin master------------我们第一次push
的时候,加上-u
参数,Git就会把本地的master分支和远程的master分支进行关联起来,我们以后的push
操作就不再需要加上-u
参数了To https://gitee.com/antims/zdh.git ! [rejected] master -> master (fetch first)error: failed to push some refs to 'https://gitee.com/antims/zdh.git'hint: Updates were rejected because the remote contains work that you dohint: not have locally. This is usually caused by another repository pushinghint: to the same ref. You may want to first integrate the remote changeshint: (e.g., 'git pull ...') before pushing again.---------------------------------------提示要先拉取hint: See the 'Note about fast-forwards' in 'git push --help' for details.E:\mm\zdh>git pull origin masterwarning: no common commitsremote: Counting objects: 4, done.remote: Compressing objects: 100% (3/3), done.remote: Total 4 (delta 0), reused 0 (delta 0)Unpacking objects: 100% (4/4), done.From https://gitee.com/antims/zdh * branch master -> FETCH_HEAD * [new branch] master -> origin/masterfatal: refusing to merge unrelated historiesE:\mm\zdh>git push -u origin master-------------------不可以To https://gitee.com/antims/zdh.git ! [rejected] master -> master (non-fast-forward)error: failed to push some refs to 'https://gitee.com/antims/zdh.git'hint: Updates were rejected because the tip of your current branch is behind--------提示你本地分支的版本落后(更新被拒绝,因为您当前分支的提示落后)hint: its remote counterpart. Integrate the remote changes (e.g.hint: 'git pull ...') before pushing again.hint: See the 'Note about fast-forwards' in 'git push --help' for details.E:\mm\zdh>git push -u -f origin master----------------------注释:-f是强制推送,覆盖远程Counting objects: 5, done.Delta compression using up to 4 threads.Compressing objects: 100% (2/2), done.Writing objects: 100% (5/5), 316 bytes | 0 bytes/s, done.Total 5 (delta 0), reused 0 (delta 0)To https://gitee.com/antims/zdh.git + b9d4e84...fb730f5 master -> master (forced update)Branch master set up to track remote branch master from origin.
阅读全文
0 0
- git初始化项目提交到码云
- 使用git提交项目到码云
- 通过Git提交项目到码云
- 使用git提交项目到码云
- git初始化仓库,远程提交
- 【工具】使用git提交项目到码云
- git oschina 提交项目
- 项目提交git
- git提交项目
- Git 提交项目代码
- 项目提交git
- Git提交项目
- git提交项目出错
- git初始化项目
- git初始化项目
- idea Git项目初始化
- Git 初始化仓库及提交修改
- iOS之git提交项目
- 【MOOC—数据结构习题】两个有序链表序列的合并
- 软件工程作业习题2.2
- 3.TPC-C测试工具——创建表
- c++基础之文件的随机访问fseek
- jdk的安装与配置
- git初始化项目提交到码云
- Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal
- Object[ ] toArray()与 <T> T[ ] toArray(T[] a)
- 4.TPC-C测试工具——导入TPCC数据
- 软件工程作业习题2.3
- 跨域问题(什么是跨域?怎么解决跨域问题?)
- 初探Hadoop 2.x
- HTTP请求:从浏览器地址栏输入url到页面显示的全过程(Complete Procedure of How an HTTP Request Works)
- 打开AndroidStudio提示端口号只允许 用一次