本地E盘workspace目录下新增了spring-cloud-alibaba-demo项目,还没有编译过,没有target等不需要推送至git的文件,所以就直接用git bash丢到github了。先在github上创建一个空项目,跟本地目录同名:

  然后就纯命令行操作了,打开git bash:

wulf@wulf00 MINGW64 /c/Users
$ cd e: wulf@wulf00 MINGW64 /e
$ cd workspace/spring-cloud-alibaba-demo/ wulf@wulf00 MINGW64 /e/workspace/spring-cloud-alibaba-demo
$ git init
Initialized empty Git repository in E:/workspace/spring-cloud-alibaba-demo/.git/ wulf@wulf00 MINGW64 /e/workspace/spring-cloud-alibaba-demo (master)
$ git remote add origin https://github.com/wuxun1997/spring-cloud-alibaba-demo.git wulf@wulf00 MINGW64 /e/workspace/spring-cloud-alibaba-demo (master)
$ git add .
warning: LF will be replaced by CRLF in pom.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in spring-cloud-alibaba-consumer/pom.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in spring-cloud-alibaba-consumer/src/main/resources/application.properties.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in spring-cloud-alibaba-gateway/pom.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in spring-cloud-alibaba-provider/pom.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in spring-cloud-alibaba-provider/src/main/java/com/wlf/alibaba/provider/TransProviderApplication.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in spring-cloud-alibaba-provider/src/main/resources/application.properties.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in spring-cloud-alibaba-provider/src/test/java/com/lingxicloud/lxytrans/provider/TransProviderApplicationTests.java.
The file will have its original line endings in your working directory. wulf@wulf00 MINGW64 /e/workspace/spring-cloud-alibaba-demo (master)
$ git commit -m "first commit"
[master (root-commit) e75e0ee] first commit
13 files changed, 525 insertions(+)
create mode 100644 pom.xml
create mode 100644 spring-cloud-alibaba-consumer/pom.xml
create mode 100644 spring-cloud-alibaba-consumer/src/main/java/com/wlf/alibaba/consumer/TransConsumerApplication.java
create mode 100644 spring-cloud-alibaba-consumer/src/main/resources/application.properties
create mode 100644 spring-cloud-alibaba-gateway/pom.xml
create mode 100644 spring-cloud-alibaba-gateway/src/main/java/com/wlf/alibaba/gate/GatewayConfiguration.java
create mode 100644 spring-cloud-alibaba-gateway/src/main/java/com/wlf/alibaba/gate/TransGatewayApplication.java
create mode 100644 spring-cloud-alibaba-gateway/src/main/resources/application.yml
create mode 100644 spring-cloud-alibaba-provider/pom.xml
create mode 100644 spring-cloud-alibaba-provider/src/main/java/com/wlf/alibaba/provider/TestService.java
create mode 100644 spring-cloud-alibaba-provider/src/main/java/com/wlf/alibaba/provider/TransProviderApplication.java
create mode 100644 spring-cloud-alibaba-provider/src/main/resources/application.properties
create mode 100644 spring-cloud-alibaba-provider/src/test/java/com/lingxicloud/lxytrans/provider/TransProviderApplicationTests.java wulf@wulf00 MINGW64 /e/workspace/spring-cloud-alibaba-demo (master)
$ git push -u origin master
Logon failed, use ctrl+c to cancel basic credential prompt.
Username for 'https://github.com': wuxun1997
Counting objects: 48, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (28/28), done.
Writing objects: 100% (48/48), 5.81 KiB | 424.00 KiB/s, done.
Total 48 (delta 6), reused 0 (delta 0)
remote: Resolving deltas: 100% (6/6), done.
To https://github.com/wuxun1997/spring-cloud-alibaba-demo.git
* [new branch] master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'. wulf@wulf00 MINGW64 /e/workspace/spring-cloud-alibaba-demo (master)
$

  最后推送时校验了用户名和密码,上面标黄处是我们密码输错了,所以下面又重新输了下。最后我们看到代码已经提交到git了:

  另外通过IDEA推送的方式参见IDEA新建本地项目关联远程git仓库

windows下新增项目本地通过git bash推送至远程github的更多相关文章

  1. git 现在本地创建仓库 再 推送到 远程 github 仓库中

    今天,需要再本地使用git管理代码,但是当代码创建好的时候,想发布到github上面的私有仓库中,但是没有提前创建远端仓库,所以需要把本地git仓库推送到远端另外一个仓库了,下面进行简要记录,刚刚经过 ...

  2. Git把本地代码推送到远程github仓库

    运用Git版本控制系统进行代码的管理,以便于团队成员的协作,由于之前是使用svn来进行版本控制,所以对于Git使用还有待熟练掌握.Git与svn类似,个人认为两者之间比较直观的区别就是 Git 不需要 ...

  3. Git创建本地分支并推送到远程github仓库

  4. SourceTree 将本地已有的git项目推送到远程git仓库

    1.在远程git仓库创建对应的项目: 2.用命令行生成本地的ssh key; 3.把公钥粘贴远程仓库对应的位置: 4.SourceTree 设置远程仓库的地址: 5.把本地对应的分支推送到远程仓库: ...

  5. 如何把已有的本地git仓库,推送到远程新的仓库(github private)并进行远程开发;

    最近因为疫情,在家干活,连接不上之前的gitlab 服务器:所以不得把现有的代码迁移到github 的私有仓库来进行开发:下面简要记录迁移的过程: 首先,确保你已经配置好本地访问远程私有仓库的所有权限 ...

  6. git使用——推送本地文件到远程仓库

    捣鼓了一下午之后总结如下:   1.首先可以照着这个链接里面博主给出的详细方法进行操作和配置: http://www.open-open.com/lib/view/open1454507333214. ...

  7. Git创建本地仓库并推送至远程仓库

    作为一名测试同学,日常工作经常需要checkout研发代码进行code review.自己极少有机会创建仓库,一度以为这是一个非常复杂过程.操作一遍后,发现也不过六个步骤,so,让我们一起揭开这神秘面 ...

  8. Eclipse本地创建新的GIT分支,并推送至远程Git分支

    本地创建新的GIT分支: 1.右击要创建新分支的项目——Team——Switch To——New Branch…: 2.在弹出的对话框中name框中输入要创建的分支名称,(如果是当前显示的要拷贝的分支 ...

  9. 12.Git分支-推送(push)、跟踪分支、拉取(pull)、删除远程分支

    1.推送 本地的分支并不会自动与远程仓库同步,你可以显示的向远程仓库推送你的分支.例如你在本地创建了一个dev分支,你想其他的人和你一样在dev之下进行工作,可以使用 git push <rem ...

随机推荐

  1. 2019牛客多校第一场 A.Equivalent Prefixes

    题目描述 Two arrays u and v each with m distinct elements are called equivalent if and only if RMQ(u,l,r ...

  2. 题解 洛谷P2503 【[HAOI2006]均分数据】

    看了眼题目和数据范围\(n \leq 20,k \leq 6\)自然想到了\(dfs\)分组求解,主要是被这道题坑自闭过. 然而硬来\(dfs\)肯定会被蜜汁\(T\)掉,因为暴力\(n\)个数所在集 ...

  3. python+selenium+chrome初级自动化操作

    例1. #coding=utf- from selenium import webdriver import os,time chromedriver = "C:\Users\AppData ...

  4. Nutch2.1+solr3.6.1+mysql5.6问题

    1.Nutch2.1问题 1.1 问题:导入完成后,Nutch2.1里面runtime仍旧不能运行,出现jobfailed等错误. 解决:runtime里的nutch调试过程和导入Eclipse差不多 ...

  5. keepalived 的 vrrp_script

    [root@centos01 keepalived]# cat check_httpd.sh 脚本需要有执行权限 通常情况下,利用keepalived做热备,其中一台设置为master,一台设置为ba ...

  6. 时间模块-datetime精确到微妙级

    1.标准转换格式符号说明 %a 本地星期的短名称 如:Sun, Mon, ..., Sat (en_US); So, Mo, ..., Sa (de_DE) %A 本地星期全名称 如 :Sunday, ...

  7. php之简单socket编程

    一.什么是套接字 源IP地址和目的IP地址以及源端口号和目的端口号的组合称为套接字.其用于标识客户端请求的服务器和服务. 二.php套接字实例 服务端代码:socket.php <?php er ...

  8. Android中显式意图和隐式意图的区别

    1.显式意图 可以直接通过名称开启指定的目标组件: 通过构造方法Intent(Context packageContext,class<?>cls)来实现. button_1 = (But ...

  9. 【洛谷】P4167 [Violet]樱花

    题面 又懒得弄题面,开个传送门吧 分析 人生第一次切数学题,我们先把方程写出来 $$\frac {1}{x}+\frac {1}{y}=\frac {1}{n!}$$ 现在我们知道的条件是x,y都是正 ...

  10. 2、ES6结构赋值和模板字符串

    ES6允许按照一定的模式,从数组和对象中提取值,这被称为结构,即解开数据的结构 1.数组的解构赋值 let [a,b] = [1,2] let [a,b,c=100] = [1,2] //c的默认值为 ...