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

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. Android selector item 属性大全(按钮按下不同效果)

    <selector>         必须.必须是根元素.包含一个或多个<item>元素.          Attributes:             xmlns:and ...

  2. hdu 1544 水题

    水题 /* * Author : ben */ #include <cstdio> #include <cstdlib> #include <cstring> #i ...

  3. [BILL WEI] stimulsoft 分组页眉页脚的使用

    我们在通过stimulsoft设计报表的时候,有的时候,需要做出如下图报表样式 这个时候,因为箱号是分开扩展的,我们就需要用到分组页眉了,如下图demo跟实例所示:

  4. [python]倒计时实现

    for num in range(5,0,-1):     time.sleep(1)     sys.stdout.flush()     sys.stdout.write('\rPlease Wa ...

  5. IOC框架Ninject实践总结

    原文地址:http://www.cnblogs.com/jeffwongishandsome/archive/2012/04/15/2450462.html IOC框架Ninject实践总结 一.控制 ...

  6. 从python的yield说起

    前段时间在读trac 中wiki模块的源码的时候,发现了很多地方都使用了yiled这一关键词, 感觉是在需要返回某个值的地方通过yield来代替return, 不是很明白其用法,所以仔细研究下. 一个 ...

  7. 测试的rtsp地址

    无线城市 千里眼 http://218.204.223.237:8081/wap/show_video.php?vd=1  右键->复制链接地址即可获得Rtsp地址.

  8. CentOS搭建LAMP环境

    最近准备安装roundcube,需要先搭建一个 LAMP 运行环境,从网上搜索了一下,有不少资料.自己也按部就班安装了一遍,把过程整理了下来. LAMP 是Linux, Apache, MySQL, ...

  9. C++ 我想这样用(四)

    嗯,已经是第四篇了,这篇起我就要开始细说语法了,不过在那之前再次申明下主旨:"C++我想这样用" 系列文案是为C程序员打造的,不是C++程序员. 我的终极目标是:让那些觊觎面向对象 ...

  10. 在Heroku上部署MEAN

    说明:个人博客地址为edwardesire.com,欢迎前来品尝. Heroku是国外普遍使用大受好评的PaaS,支持Nodejs,基础服务(Nodejs+MongoDB)基本都是免费的.搭建MEAN ...