一、从远程克隆项目,修改后提交

1、先切换要放项目的本地目录

C:\Users\chendd>cd E:\web

C:\Users\chendd>e:

2、根据服务器的git地址克隆到本地,并查看状态

E:\web>git clone https://github.com/findbugGroup/findbug-v0..git
Cloning into 'findbug-v0.1'...
remote: Counting objects: , done.
remote: Compressing objects: % (/), done.
remote: Total (delta ), reused (delta )
Receiving objects: % (/), 3.29 MiB | 190.00 KiB/s, done.
Resolving deltas: % (/), done.
Checking connectivity... done. E:\web>git status
fatal: Not a git repository (or any of the parent directories): .git E:\web>cd findbug-v0. E:\web\findbug-v0.>git status
On branch master
Your branch is up-to-date with 'origin/master'. Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory) modified: README.md no changes added to commit (use "git add" and/or "git commit -a")

3、修改下项目,提交到本地暂存(可能要输入用户名,密码。也可以提前配置)

E:\web\findbug-v0.>git commit -a -m "test"

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
git config --global user.name "Your Name" to set your account's default identity.
Omit --global to set the identity only in this repository. fatal: unable to auto-detect email address (got 'chendd@chendd-PC.(none)') E:\web\findbug-v0.>git config --global user.email "mail4chedd@qq.com" E:\web\findbug-v0.>git config --global user.name "chendd" E:\web\findbug-v0.>git commit -a -m "test"
[master 32a7c94] test
file changed, insertion(+)

4、提交到远程服务器上去

E:\web\findbug-v0.>git push origin master
Username for 'https://github.com': chendd
Password for 'https://chendd@github.com':
Counting objects: , done.
Delta compression using up to threads.
Compressing objects: % (/), done.
Writing objects: % (/), bytes | bytes/s, done.
Total (delta ), reused (delta )
To https://github.com/findbugGroup/findbug-v0..git
6fd4585..32a7c94 master -> master

二、将本地项目提交到远程服务器

1、先在远程网站上 new 个新的repository,复制git地址

然后按照 网站上说的 终端上运行命令(这里我是后来再新建的,故git名加个2,区分)

E:\web\findbug-v0.>cd ..

E:\web>mkdir beatplane

E:\web>cd beatplane

E:\web\beatplane>git init
Initialized empty Git repository in E:/web/beatplane/.git/ E:\web\beatplane>touch README.md E:\web\beatplane>git add README.md E:\web\beatplane>git add . E:\web\beatplane>git commit -m "first commit"
[master (root-commit) 7c19145] first commit
files changed, insertions(+), deletions(-)
create mode README.md
create mode "\346\226\260\345\273\272\346\226\207\346\234\254\346\226\20
\\\ ().txt"
create mode "\346\226\260\345\273\272\346\226\207\346\234\254\346\226\20
\\\.txt" E:\web\beatplane>git remote add origin https://github.com/chendd/BeatPlane.git E:\web\beatplane>git push -u origin master
Username for 'https://github.com': chendd
Password for 'https://chendd@github.com':
Counting objects: , done.
Delta compression using up to threads.
Compressing objects: % (/), done.
Writing objects: % (/), bytes | bytes/s, done.
Total (delta ), reused (delta )
To https://github.com/chendd/BeatPlane.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.

提交刷新网页,大功告成

附:git客户端 安装 和使用

git 提交远程的更多相关文章

  1. git提交远程仓库命令

    在已有的git库中搭建新库,并且将本地的git仓库,上传到远程服务器的git库中,从而开始一个新的项目 首先,在本地新建文件夹abc,进入到abc里面,然后git init.这样就在本地初始化了一个g ...

  2. 使用git提交远程仓库

    git pull    更新 git add 文件名   将文件添加到暂存区 git commit -m ‘注释’   提交 git push origin master   提交到远程仓库

  3. git提交远程报错[rejected] master -> master (fetch first)

    1 先下载git for windows 然后一直点下一步安装. 2 安装之后,选择git gui.生成ssh 链接 git 公钥. 用命令也可以: $ ssh-keygen -t rsa -C &q ...

  4. eclipse使用git提交本地项目,提交至远程github上

    准备工作: 目的:eclipse使用git提交本地项目,提交至远程github上 eclipse版本:eclipse4.5  64位 jdk版本:jdk-1.7 64位 项目类型:maven web项 ...

  5. git学习四:eclipse使用git提交项目

    支持原创:http://blog.csdn.net/u014079773/article/details/51595127 准备工作: 目的:eclipse使用git提交本地项目,提交至远程githu ...

  6. eclipse使用git提交项目

    eclipse使用git提交项目有2种方式:一种是git命令窗口,另一种是eclipse自带git插件(跟svn插件一样使用) 一.使用git命令窗口提交项目 1.首先官网下载git并安装,然后配置用 ...

  7. 不用copy代码--eclipse使用git提交项目-转

    原文地址:http://blog.csdn.net/u014079773/article/details/51595127 准备工作: 目的:eclipse使用git提交本地项目,提交至远程githu ...

  8. eclipse使用git提交代码

    准备工作: 目的:eclipse使用git提交本地项目,提交至远程github上 eclipse版本:eclipse4.5  64位 jdk版本:jdk-1.7 64位 项目类型:maven web项 ...

  9. git提交项目到已存在的远程分支

    今天想提交项目到github的远程分支上,那个远程分支是之前就创建好的,而我的本地关联分支还没创建.   之前从未用github提交到远程分支过,弄了半个钟,看了几篇博文,终于折腾出来.现在把步骤整理 ...

随机推荐

  1. 获取手机中已安装apk文件信息(PackageInfo、ResolveInfo)(应用图片、应用名、包名等)

    众所周知,通过PackageManager可以获取手机端已安装的apk文件的信息,具体代码如下: PackageManager packageManager = this.getPackageMana ...

  2. Eclipse中设置在创建新类时自动生成注释的方法

     windows–>preference Java–>Code Style–>Code Templates code–>new Java files 编辑它 ${filecom ...

  3. 理解CSS盒子模型

    概述 网页设计中常听的属性名:内容(content).填充(padding).边框(border).边界(margin),CSS盒子模型都具备这些属性,也主要是这些属性. 这些属性我们可以把它转移到我 ...

  4. vs2010 无法连接到asp.net development server

    http://blog.csdn.net/xqf309/article/details/7881257 今天打开之前的程序,按了F5进行调试,等了会弹出窗体来说:无法连接到asp.net develo ...

  5. Chapter 1 初探Caffe

    首先下载windows下源码: Microsoft 官方:GitHub - Microsoft/caffe: Caffe on both Linux and Windows 官方源码使用Visual ...

  6. mongodb 新建用户 -摘自网络

    随着版本的更新,对在使用mongodb的业务也进行了版本升级,但是在drop掉一个数据库时,问题来了,原来的用户随着删除库也被删除掉,但是再想通过原来的语法db.addUser()添加,一直报错,提示 ...

  7. 安装 RabbitMQ C#使用-摘自网络(包括RabbitMQ的配置)

    1.什么是RabbitMQ.详见 http://www.rabbitmq.com/ . 作用就是提高系统的并发性,将一些不需要及时响应客户端且占用较多资源的操作,放入队列,再由另外一个线程,去异步处理 ...

  8. cloudera hbase集群简单思路

    文章copy link:http://cloudera.iteye.com/blog/889468 链接所有者保留所有权! http://www.csdn.net/article/2013-05-10 ...

  9. JAVA中的常见面试题1

    1.线程同步的方法的使用. sleep():使一个正在运行的线程处于睡眠状态,是一个静态方法,调用此方法要捕捉InterruptedException异常. wait():使一个线程处于等待状态,并且 ...

  10. Web Service学习之七:CXF拦截器

    一.用途 CXF拦截器类似Struts2的拦截器,后者是拦截和处理请求,前者是对发送和接收的sope消息进行处理,一般用于WS请求响应中的权限验证.日志记录,Soap消息处理,消息的压缩处理等: 这个 ...