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提交到远程分支过,弄了半个钟,看了几篇博文,终于折腾出来.现在把步骤整理 ...
随机推荐
- Claim-based-security for ASP.NET Web APIs using DotNetOpenAuth
Recently I worked with a customer assisting them in implementing their Web APIs using the new ASP.NE ...
- C语言-简单哈希表(hash table)
腾讯三面的时候,叫我写了个哈希表,当时紧张没写好···结果跪了··· 回来后粪发涂墙,赶紧写了一个! 什么都不说了···先让我到厕所里面哭一会··· %>_<% 果然现场发挥,以及基础扎实 ...
- C#相关图书推荐
C#入门经典(第6版) 作 者 [美] Karli Watson,Jacob Vibe Hammer,Jon D Reid 等 著: 出 版 社 清华大学出版社 出版时间 2014-01-0 ...
- RabbitMQ三种Exchange模式(fanout,direct,topic)的特性 -摘自网络
RabbitMQ中,所有生产者提交的消息都由Exchange来接受,然后Exchange按照特定的策略转发到Queue进行存储 RabbitMQ提供了四种Exchange:fanout,direct, ...
- 你想成为优秀的Java程序员吗?
Java是全世界最受欢迎的3大编程语言之一,它可以开发出许多实用的WEB应用程序和桌面应用程序,更重要的一点,Java是跨平台的语言——编写一次,可以再任何地方运行.另外,Java也很容易入门,如果你 ...
- 第二百五十天 how can I 坚持
html排版,好烦心. 我以为我会哭,但是我没有.---<领悟> 确实是搞不懂自己,到底想要什么?弟弟最近也不知道咋的了,感觉有点不对劲呢. 最近雾霾好严重,希望我们的后代不会知道雾霾是什 ...
- homework08
1.局部变量生命周期 #include "iostream.h" ;} int main() { ; add1(n); cout << n << endl; ...
- work4
任务概述 给出多条英文单词,找出一个包含所有单词的填字阵.并且对于该方阵有一定特殊要求: a) Stage 1 Every phrase in the input file is cover ...
- work3
HOMEWORK-03 红字部分为组员修改的意见 文件介绍 在EXE文件夹中的main.exe文件为本项目执行文件直接点击即可,CODE文件夹中的C文件夹中包含了算法部分的代码,其编译出的DLL文件在 ...
- delphi回调函数
文章来源: http://anony3721.blog.163.com/blog/static/5119742010866050589/ 一.主单元 unit UnMain; interface us ...