The windows of new projects by local push to a remote github git bash

  New Local E disk workspace directory the spring-cloud-alibaba-demo project, has not yet compiled, no files do not need to be pushed to git the target and so on, so I threw github directly with the git bash. Create an empty project on github, the local directory with the same name:

 

  Then pure command-line operation, and open the 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)
$

  Finally, we see the code has been submitted to the git:

 

Guess you like

Origin www.cnblogs.com/wuxun1997/p/11401594.html
Recommended