lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum
$ ls
forum.iml HELP.md mvnw* mvnw.cmd pom.xml src/ target/
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum
$ pwd
/e/Users/lenovo/springboot-project/forum
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum
$ git init
Initialized empty Git repository in E:/Users/lenovo/springboot-project/forum/.git/
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum (master)
$ git init
Reinitialized existing Git repository in E:/Users/lenovo/springboot-project/forum/.git/
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum (master)
$ git status
On branch master
No commits yet
Untracked files:
(use "git add
.gitignore
.mvn/
mvnw
mvnw.cmd
pom.xml
src/
nothing added to commit but untracked files present (use "git add" to track)
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum (master)
$ git add .
warning: LF will be replaced by CRLF in .gitignore.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .mvn/wrapper/MavenWrapperDownloader.java.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .mvn/wrapper/maven-wrapper.properties.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in mvnw.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in mvnw.cmd.
The file will have its original line endings in your working directory
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 src/main/java/com/baidou/ForumApplication.java.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in 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 src/test/java/com/baidou/ForumApplicationTests.java.
The file will have its original line endings in your working directory
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum (master)
$ git add .
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum (master)
$ git commit -m "init repo"
[master (root-commit) 0b75eb5] init repo
12 files changed, 750 insertions(+)
create mode 100644 .gitignore
create mode 100644 .mvn/wrapper/MavenWrapperDownloader.java
create mode 100644 .mvn/wrapper/maven-wrapper.jar
create mode 100644 .mvn/wrapper/maven-wrapper.properties
create mode 100644 mvnw
create mode 100644 mvnw.cmd
create mode 100644 pom.xml
create mode 100644 src/main/java/com/baidou/ForumApplication.java
create mode 100644 src/main/java/com/baidou/controller/HelloController.java
create mode 100644 src/main/resources/application.properties
create mode 100644 src/main/resources/templates/hello.html
create mode 100644 src/test/java/com/baidou/ForumApplicationTests.java
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum (master)
$ git status
On branch master
nothing to commit, working tree clean
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum (master)
$ git log
commit 0b75eb59e2807ddd4882d0dd67b3ab66dba70eb5 (HEAD -> master)
Author: ximin2020 1433021114@qq.com
Date: Sun Jul 12 20:04:50 2020 +0800
init repo
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum (master)
$ git status
On branch master
nothing to commit, working tree clean
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum (master)
$ ls
forum.iml HELP.md mvnw* mvnw.cmd pom.xml src/ target/
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum (master)
$ ls .git/config
.git/config
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum (master)
$ vim .git/config
[user]
name = ximin2020
email = 1433021114@qq.com
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum (master)
$ git status
On branch master
nothing to commit, working tree clean
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum (master)
$ git remote add origin https://github.com/ximin2020/forum.git
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum (master)
$ git status
On branch master
nothing to commit, working tree clean
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum (master)
$ git push -u origin master
fatal: HttpRequestException encountered.
?????????????
Enumerating objects: 28, done.
Counting objects: 100% (28/28), done.
Delta compression using up to 8 threads
Compressing objects: 100% (19/19), done.
Writing objects: 100% (28/28), 52.95 KiB | 2.65 MiB/s, done.
Total 28 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/ximin2020/forum.git
lenovo@LAPTOP-3KMEN0B2 MINGW64 /e/Users/lenovo/springboot-project/forum (master)
$
原文:https://www.cnblogs.com/m987/p/13289685.html