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

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. C# Code for Downloading Stock Symbols z

    http://www.jarloo.com/download-stock-symbols/ If your using C# you can easily get the XML data using ...

  2. C# 邮件发送系统

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  3. MyGeneration 数据库驱动为空

    重做系统后安装了MyGeneration  但是安装完成后发现驱动中没有驱动信息,查了下网上的解决方案发下下面的可以完美解决,特作备忘: The problem is because of multi ...

  4. Mahout踩坑之路

    一.版本对比 公司版Mahout 由于Mahout只能允许于hadoop0.20以上版本上,而百度的hadoop是hadoop0.19的一个分支.因此百度HPC组曾经将Mahout移植到百度的hado ...

  5. 查看linux服务器中的apache是否安装以及安装路径

    1.可以通过 apachectl -v 查看apache是否安装,如果安装了的话会显示版本号: 2.如果通过rpm包安装的话可以用  rpm -q  httpd 查看,如果安装的的话会显示包的名称

  6. oc_转_NSInteger 和 NSNumber

    Objective-C 支持的类型有两种:基本类型和类. 基本类型,如同 C 语言中的 int 类型一样,拿来就可以直接用.而类在使用时,必须先创建一个对象,再为对象分配空间,接着做初始化和赋值.类的 ...

  7. Lucene学习笔记: 五,Lucene搜索过程解析

    一.Lucene搜索过程总论 搜索的过程总的来说就是将词典及倒排表信息从索引中读出来,根据用户输入的查询语句合并倒排表,得到结果文档集并对文档进行打分的过程. 其可用如下图示: 总共包括以下几个过程: ...

  8. Spark Streaming 架构

    图 1   Spark Streaming 架构图 组件介绍:‰ Network Input Tracker : 通 过 接 收 器 接 收 流 数 据, 并 将 流 数 据 映 射 为 输 入DSt ...

  9. mysql的point类型查询处理

    mysql的point类型,很蛋疼的表示更习惯于key—value的lng,lat 假设不得不处理数据库字段poi是point类型,其中的数据为 : POINT(28.2789745229671 11 ...

  10. Win7下使Users数据与程序分离

    大家知道,数据是用户最大的财富,但Windows系统默认的模式是将所有软件都安装在C盘,在Windows XP时代,数据文件夹会放在Document And Setting 目录下,在Win7时代,数 ...