步骤截图:
以下 是操作:
Rickie@RickieSayHi MINGW32 ~/Desktop/Test
$ git init
Initialized empty Git repository in C:/Users/Rickie/Desktop/Test/.git/
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ touch README.md
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git add .
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git remote -v
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git commite -m "【2022年9月6日17:31:32】第一次提交文件"
git: 'commite' is not a git command. See 'git --help'.
The most similar command is
commit
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git commit -m "【2022年9月6日17:31:57】第一次提交文件"
[main (root-commit) 8e85b89] 【2022年9月6日17:31:57】第一次提交文件
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 README.md
create mode 100644 "\346\265\213\350\257\225\344\270\212\344\274\240\346\226\207\344\273\266\345\210\260 github \345\222\214 gitee.txt"
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git remote add github git@github.com:RickieSayHi/GithubWarehouse.git
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git remote -v
github git@github.com:RickieSayHi/GithubWarehouse.git (fetch)
github git@github.com:RickieSayHi/GithubWarehouse.git (push)
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git remote add gitee git@gitee.com:RickieSayHi/gitee-warehouse.git
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git remote -v
gitee git@gitee.com:RickieSayHi/gitee-warehouse.git (fetch)
gitee git@gitee.com:RickieSayHi/gitee-warehouse.git (push)
github git@github.com:RickieSayHi/GithubWarehouse.git (fetch)
github git@github.com:RickieSayHi/GithubWarehouse.git (push)
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git branch -M main
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git push -u github main
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 313 bytes | 313.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:RickieSayHi/GithubWarehouse.git
* [new branch] main -> main
branch 'main' set up to track 'github/main'.
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git push -u gitee "main"
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 313 bytes | 313.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Powered by GITEE.COM [GNK-6.4]
remote: Create a pull request for 'main' on Gitee by visiting:
remote: https://gitee.com/RickieSayHi/gitee-warehouse/pull/new/RickieSayHi:main...RickieSayHi:master
To gitee.com:RickieSayHi/gitee-warehouse.git
* [new branch] main -> main
branch 'main' set up to track 'gitee/main'.
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git branch -M main
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git pull gitee main
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 6 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (6/6), 2.07 KiB | 96.00 KiB/s, done.
From gitee.com:RickieSayHi/gitee-warehouse
* branch main -> FETCH_HEAD
8e85b89..e3e95db main -> gitee/main
Updating 8e85b89..e3e95db
Fast-forward
README.md | 9 +++++++++
1 file changed, 9 insertions(+)
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git pull github main
kex_exchange_identification: read: Software caused connection abort
banner exchange: Connection to 20.205.243.166 port 22: Software caused connection abort
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git pull github main
From github.com:RickieSayHi/GithubWarehouse
* branch main -> FETCH_HEAD
Already up to date.
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git push github main
Connection reset by 20.205.243.166 port 22
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git push github main
Enumerating objects: 8, done.
Counting objects: 100% (8/8), done.
Delta compression using up to 8 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 2.09 KiB | 1.05 MiB/s, done.
Total 6 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:RickieSayHi/GithubWarehouse.git
8e85b89..e3e95db main -> main
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git add .
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git commit -m "【2022年9月6日17:57:53】提交文件"
[main 2f3e26d] 【2022年9月6日17:57:53】提交文件
1 file changed, 130 insertions(+)
create mode 100644 "git\345\220\214\346\255\245\344\273\223\345\272\223\345\210\260github\345\222\214gitee\347\232\204\345\221\275\344\273\244.md"
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git push github main
kex_exchange_identification: read: Software caused connection abort
banner exchange: Connection to 20.205.243.166 port 22: Software caused connection abort
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git push github main
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 1.59 KiB | 1.59 MiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:RickieSayHi/GithubWarehouse.git
e3e95db..2f3e26d main -> main
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$ git push gitee main
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 1.59 KiB | 1.59 MiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Powered by GITEE.COM [GNK-6.4]
To gitee.com:RickieSayHi/gitee-warehouse.git
e3e95db..2f3e26d main -> main
Rickie@RickieSayHi MINGW32 ~/Desktop/Test (main)
$