git 提交远程
一、从远程克隆项目,修改后提交
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提交远程仓库命令
在已有的git库中搭建新库,并且将本地的git仓库,上传到远程服务器的git库中,从而开始一个新的项目 首先,在本地新建文件夹abc,进入到abc里面,然后git init.这样就在本地初始化了一个g ...
- 使用git提交远程仓库
git pull 更新 git add 文件名 将文件添加到暂存区 git commit -m ‘注释’ 提交 git push origin master 提交到远程仓库
- git提交远程报错[rejected] master -> master (fetch first)
1 先下载git for windows 然后一直点下一步安装. 2 安装之后,选择git gui.生成ssh 链接 git 公钥. 用命令也可以: $ ssh-keygen -t rsa -C &q ...
- eclipse使用git提交本地项目,提交至远程github上
准备工作: 目的:eclipse使用git提交本地项目,提交至远程github上 eclipse版本:eclipse4.5 64位 jdk版本:jdk-1.7 64位 项目类型:maven web项 ...
- git学习四:eclipse使用git提交项目
支持原创:http://blog.csdn.net/u014079773/article/details/51595127 准备工作: 目的:eclipse使用git提交本地项目,提交至远程githu ...
- eclipse使用git提交项目
eclipse使用git提交项目有2种方式:一种是git命令窗口,另一种是eclipse自带git插件(跟svn插件一样使用) 一.使用git命令窗口提交项目 1.首先官网下载git并安装,然后配置用 ...
- 不用copy代码--eclipse使用git提交项目-转
原文地址:http://blog.csdn.net/u014079773/article/details/51595127 准备工作: 目的:eclipse使用git提交本地项目,提交至远程githu ...
- eclipse使用git提交代码
准备工作: 目的:eclipse使用git提交本地项目,提交至远程github上 eclipse版本:eclipse4.5 64位 jdk版本:jdk-1.7 64位 项目类型:maven web项 ...
- git提交项目到已存在的远程分支
今天想提交项目到github的远程分支上,那个远程分支是之前就创建好的,而我的本地关联分支还没创建. 之前从未用github提交到远程分支过,弄了半个钟,看了几篇博文,终于折腾出来.现在把步骤整理 ...
随机推荐
- codeforces 685B Kay and Snowflake 树的重心
分析:就是找到以每个节点为根节点的树的重心 树的重心可以看这三篇文章: 1:http://wenku.baidu.com/link?url=yc-3QD55hbCaRYEGsF2fPpXYg-iO63 ...
- IOS 通知 alarm 记录
所有的内容融为一体,去除某一个项不知道结果如何. 最主要的前提:APP 会长期保留在后台 1.在info.plist 文件里面,加入 audio 后台请求 2.当APP 点击home进入后台之后,请求 ...
- IOS Swizzle(hook)
/////////////////////////////////////////////////////////////////////////////////////////////////// ...
- [python]倒计时实现
for num in range(5,0,-1): time.sleep(1) sys.stdout.flush() sys.stdout.write('\rPlease Wa ...
- <转>Python 参数知识(变量前加星号的意义)
csdn上的牛人就是多,加油 —————————————————————————— 过量的参数 在运行时知道一个函数有什么参数,通常是不可能的.另一个情况是一个函数能操作很多对象.更有甚者,调用自身的 ...
- Casperjs/PhantomJs 中文网站截图乱码
使用CasperJs进行自动化测试中文网站的时候发现中文网站截图会出现乱码的现象,中文汉字被一个个小方框代替 查找了一些资料发现是因为Linux服务器上没有安装中文字体导致的,Linux如何安装中文字 ...
- 关于Windows 7的64位系统不兼容某些控件的问题
我的问题是vsflex7.ocx 不能在64位系统下运行,导致软件的一个涉及到这个控件的功能出错.如下: 解决的办法基本思路是把这个控件注册一下.然后就可以了.就是这个控件: 目录中没有自己下载个. ...
- qt 设置背景图片
博客出处:http://www.cppblog.com/qianqian/archive/2010/07/25/121238.htm 工作似乎走上正轨了,上周五的工作是做一个界面,用到QFrame和Q ...
- 关于CodeBlocks中stdc++-6.dll缺失的小问题
前一阵子在用CodeBlocks刷OJ(也并不是什么很难的算法,背包问题而已)时,遇到了个小麻烦,按下F9编译运行(有的人习惯用鼠标去点那个小button,多麻烦啊)后,Windows给我跳出个小窗说 ...
- 数往知来C#之面向对象准备〈一〉
1.CLR加载编译源文件 注1.:当你点击调试或者生成解决方案的时候这就是一个编译过程首先CLR加载源文件也就是你写的代码(此代码在文件中是字符串)然后将项目中的嗲吗编译成IL代码进而生成程序集 证明 ...