使用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 ...
随机推荐
- 混合开发的大趋势之一React Native之简单的登录界面
转载请注明出处:王亟亟的大牛之路 这些天都在学习RN这部分吧,然后写了个简单的登陆业务,从"实战"中讲解吧 还是继续安利:https://github.com/ddwhan0123 ...
- 设置CentOS7虚拟机使用静态IP上网
一.在VMware里,依次点击”编辑“ - ”虚拟网络编辑器“,如下图,我选择的是NAT模式: 为了能够使用静态IP,这里不要勾选”使用本地DHCP服务将IP分配给虚拟机“这个选项.然后是配置子网ip ...
- KindEditor ctrl+v添加图片功能
原理: 监听粘贴事件(paste) 获取粘贴版数据,读取到图片数据流进行加载base64 传到后台服务端直接输出为图片文件保存后返回图片读取路径插入编辑器中 /** * 获取编辑器对象 */ wind ...
- The SO_REUSEPORT socket option
One of the features merged in the 3.9 development cycle was TCP and UDP support for the SO_REUSEPORT ...
- Exception occurred during processing request: null报错
报错, 恶心的一笔. 报错的地方 解决方法: 没注意到...
- UML类图概述、设计模式
深入浅出UML类图(http://blog.csdn.net/lovelion/article/details/7843308) 类(Class)封装了数据和行为,是面向对象的重要组成部分,它是具有相 ...
- ANR异常
ANR异常 一.简介 解决方法:别在主线程中写非常耗时的操作 二.代码实例 点击之后,不停点击,乱点 出现anr异常 代码 /anr/src/anr/MainActivity.java package ...
- 清理网页中的HTML
public string ClearHtml(string text)//过滤html,js,css代码 { text = text.Trim(); if (string.IsNullOrEmpty ...
- CentOS开端口问题
关闭SELINUX ##查看SELINUX状态 /usr/sbin/sestatus -v getenforce #修改config配置文件,重启后即可 vi /etc/selinux/config ...
- AOP(面向切面)的粗俗理解
百度百科的解释:AOP主要实现的目的是针对业务处理过程中的切面进行提取,它所面对的是处理过程中的某个步骤或阶段,以获得逻辑过程中各部分之间低耦合性的隔离效果. 一个比较绕的概念,简单来说就是把不影响业 ...