创建SpringBoot项目并且关联远程仓库
本地项目搭建
通过Git Bash Here打开项目
86188@LAPTOP-510POQ99 MINGW64 /d/MyGitStore/gitcode/FishRent (master)
$ git init
Initialized empty Git repository in D:/MyGitStore/gitcode/FishRent/.git/
86188@LAPTOP-510POQ99 MINGW64 /d/MyGitStore/gitcode/FishRent (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
86188@LAPTOP-510POQ99 MINGW64 /d/MyGitStore/gitcode/FishRent (master)
$ git commit -m "initial commit"
[master (root-commit) a510e0e] initial commit
10 files changed, 713 insertions(+)
create mode 100644 .gitignore
create mode 100644 src/test/java/cn/edu/zjut/FishRentApplicationTests.java
86188@LAPTOP-510POQ99 MINGW64 /d/MyGitStore/gitcode/FishRent (master)
$ git remote add origin https://gitee.com/feng-jianxiong/fish-show.git
86188@LAPTOP-510POQ99 MINGW64 /d/MyGitStore/gitcode/FishRent (master)
$ git push origin master
To https://gitee.com/feng-jianxiong/fish-show.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://gitee.com/feng-jianxiong/fish-show.git'
hint: Updates were rejected because the remote contains work that you do
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
86188@LAPTOP-510POQ99 MINGW64 /d/MyGitStore/gitcode/FishRent (master)
$ git pull origin master --allow-unrelated-histories
remote: Enumerating objects: 14, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 14 (delta 1), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (14/14), 9.51 KiB | 129.00 KiB/s, done.
From https://gitee.com/feng-jianxiong/fish-show
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
Already up to date.
Merge made by the 'recursive' strategy.
86188@LAPTOP-510POQ99 MINGW64 /d/MyGitStore/gitcode/FishRent (master)
$ git push origin master
Enumerating objects: 28, done.
Counting objects: 100% (28/28), done.
Delta compression using up to 12 threads
Compressing objects: 100% (18/18), done.
Writing objects: 100% (27/27), 52.49 KiB | 3.50 MiB/s, done.
Total 27 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Powered by GITEE.COM [GNK-6.2]
To https://gitee.com/feng-jianxiong/fish-show.git
553153c..276db3e master -> master
我们的项目已经搭建好了
|