使用git将代码推到coding
1:前提下载好Git
2:在电脑上创建一个文件夹,打开此文件夹,单击右键—〉 git bash here
3:输入git init
完成后会在此文件夹下生成一个隐藏的.git后缀文件
4:将你的代码添加并提交到本地仓库
git add . ----> 所有文件
或 git add 《文件名》
git commit -m "项目描述"
5:将仓库代码推到线上coding(需要先获取远程仓库地址)
git remote add origin https:
// git.coding.net/用户名/项目名.git
git push origin master
问题:
需要账号和密码
2:出现如下错误
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.
方法:
1:git pull
Administrator@Jassin MINGW64 ~/Desktop/git (master)
$ git pull
warning: no common commits
remote: Counting objects: , done.
remote: Compressing objects: % (/), done.
remote: Total (delta ), reused (delta )
Unpacking objects: % (/), done.
From https://git.coding.net/dujassin/fristdemo
* [new branch] master -> origin/master
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull() for details. git pull <remote> <branch> If you wish to set tracking information for this branch you can do so with: git branch --set-upstream-to=origin/<branch> master
2:操作如上提示:
git pull <remote> <branch>
$ git pull --rebase origin master
From https://git.coding.net/dujassin/fristdemo
* branch master -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Applying: one
再:
$ git push -u origin master
使用git将代码推到coding的更多相关文章
- 使用 git 将代码推送到多个仓库
使用 git 将代码推送到多个仓库 起因 起初,在 GitHub 建了一个仓库,200+ 的 commits .后来(终于在眼泪中明白...误
- Git 将本地代码推到 Coding 远程仓库
1 首先创建文件夹,将要推的项目文件夹拷贝过来,进入文件夹 右键 Git Bash Here 输入以下代码 把这个目录变成git管理的仓库 git init 2 把文件添加到版本库中,使用命令 git ...
- 将已有Git库代码推送到新建库中
cd /path/to/your/git/repo/ git remote -v git remote rm origin git remote add origin ssh://abc@gmail. ...
- coding上创建项目、创建代码仓库、将IDEA中的代码提交到coding上的代码仓库、Git的下载、IDEA上配置git
文章目录 一.Git的安装以及子啊IDEA上配置Git(下载好的可以跳过) 二.怎样让IDEA和Git建立关系 三.在coding上创建项目 四.在coding上创建代码仓库 五.Git工作理论 六. ...
- git 提交代码的流程
[root@ok-T IT-DOC]# ls hx-海星-wifi.rd web收藏.txt [root@ok-T IT-DOC]# git status -s ?? "web\346\22 ...
- 1. Git 克隆代码
1. Git 克隆代码 git clone git://github.com/facebook/hiphop-php.git 2. Git更新分支 查看服务器上的所有分支 [huzg@slave3 h ...
- Git版本控制:Gitlab及Coding.net的使用
http://blog.csdn.net/pipisorry/article/details/50709014 Gitlab介绍 GitLab是利用 Ruby on Rails 一个开源的版本管理系统 ...
- git提交代码五部曲
From: https://jingyan.baidu.com/article/359911f5a4fe4b57fe03060d.html 正常使用git时,提交代码五部曲. 工具/原料 电脑 已 ...
- Git提交代码失败: empty ident name (for <>) not allowed
使用git提交代码,报错如下: 下午2:56 Commit failed with error 0 files committed, 1 file failed to commit: 升级 empty ...
随机推荐
- SpringMVC HttpMessageConverter 匹配规则
以下内容,如有问题,烦请指出,谢谢! SpringMVC启动时会自动配置一些HttpMessageConverter,接收到http请求时,从这些Converters中选择一个符合条件的来进行Http ...
- Java数字证书操作
为服务器生成证书 keytool -genkey -v -alias tomcat -keyalg RSA -keystore D:\tomcat.keystore -validity 36500 为 ...
- jQuery基本筛选选择器
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- Gift for GS5
// // main.cpp // 生日快乐 // // Created by wasdns on 16/11/21. // Copyright © 2016年 wasdns. All rights ...
- JavaScript高级程序设计-读书笔记(4)
第11章 DOM扩展 1.选择符API Selector API Level 1 的核心是两个方法:querySelector()和querySelectorAll().在兼容的浏览器中,可以通过Do ...
- iOS 可变字符串NSMutableString的使用
.创建一个可变字符串 NSMutableString * ms1 = [[NSMutableString alloc]init]; .可以通过类方法来创建 NSMutableString * ms2 ...
- web项目整合Shiro框架
1.修改pom.xml文件 <dependency> <groupId>org.apache.shiro</groupId> <artifactId>s ...
- [Mybatis]Spring与Mybatis整合的MapperScannerConfigurer处理过程源码分析
转自:https://www.cnblogs.com/fangjian0423/p/spring-mybatis-MapperScannerConfigurer-analysis.html Mappe ...
- JSP 连接数据库
本章节假设您已经对JDBC有一定的了解.在开始学习JSP数据库访问前,请确保JDBC环境已经正确配置. 首先,让我们按照下面的步骤来创建一个简单的表并插入几条简单的记录: 创建表 在数据库中创建一个E ...
- HDU5137-最短路-删点
How Many Maos Does the Guanxi Worth Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 512000/5 ...