使用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 ...
随机推荐
- Live Score FAQ
Q: Why doesn't the selected game go to top? A: The game which include your favorite team will be alw ...
- jQuery的$.each()遍历checkbox
$("input[type='checkbox']").each(function(){ var value = $(this).val(); //获得值 $(this).attr ...
- SaltStack本地管理无master模式-第八篇
Salt本地管理应用场景 1.在边缘节点服务器非常少没有Salt-master 2.零售店,电影院等弱网络环境没有Salt-master 3.快速部署单个服务没有Salt-master 实现 一,安装 ...
- c# 过滤HTML代码 源代码,案例 下载
#region 过滤HTML代码 //替换掉html字符,只显示文字信息. public string replaceHtmlCode(string Htmlstring) { Htmlstring ...
- Java虚拟机组成详解
导读:详细而深入的总结,是对知识“豁然开朗”之后的“刻骨铭心”,想忘记都难. Java虚拟机(Java Virtual Machine)下文简称jvm,上一篇我们对jvm有了大体的认识,进入本文之后我 ...
- Android--------工具类StatusBarUtil实现完美状态栏
很早就想写这篇博客了,直到前几天有人问我这方面的问题才想起. 沉浸式状态栏是从android Kitkat(Android 4.4)开始出现的,顶部状态栏的颜色可以根据开发需求改变,使得APP风格更加 ...
- Apache的三种工作模式及相关配置
Apache的三种工作模式 作为老牌服务器,Apache仍在不断地发展,就目前来说,它一共有三种稳定的MPM(Multi-Processing Module,多进程处理模块).它们分别是 prefor ...
- 使用maven插件自动部署web应用至Docker容器的tomcat
配置maven 在pom.xml加入 ? 1 2 3 4 5 6 7 8 9 10 11 12 13 <plugins> <plugin> <gr ...
- R读取一个数据框 Dataframe,删去其中的某一列
可以参考:http://blog.sina.com.cn/s/blog_80572f5d0101anxw.html
- 从工程角度看C++观察者模式中的接口是否需要提供默认的实现
在C++中,我们会经常用到观察者模式(回调模式,Delegate模式等,意思都一样),比如当Source中的某个参数发生了变化时,我们通过观察者模式进行回调通知,下面是一个例子: class Sour ...