001@DESKTOP-18RGJTE MINGW64 /d/code/p5/JS/day16
$ git init
Initialized empty Git repository in D:/code/p5/JS/day16/.git/
001@DESKTOP-18RGJTE MINGW64 /d/code/p5/JS/day16 (master)
$ git remote add origin git@gitee.com:meng13666/laoshidaima.git
001@DESKTOP-18RGJTE MINGW64 /d/code/p5/JS/day16 (master)
$ git status
On branch master
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
66.txt
hr_p2112/
nothing added to commit but untracked files present (use "git add" to track)
001@DESKTOP-18RGJTE MINGW64 /d/code/p5/JS/day16 (master)
$ git add .
warning: adding embedded git repository: hr_p2112
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> hr_p2112
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached hr_p2112
hint:
hint: See "git help submodule" for more information.
001@DESKTOP-18RGJTE MINGW64 /d/code/p5/JS/day16 (master)
$ git status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: 66.txt
new file: hr_p2112
001@DESKTOP-18RGJTE MINGW64 /d/code/p5/JS/day16 (master)
$ git commit -m "第一次权限"
[master (root-commit) 1815e44] 绗竴娆℃潈闄? 2 files changed, 2 insertions(+)
create mode 100644 66.txt
create mode 160000 hr_p2112
001@DESKTOP-18RGJTE MINGW64 /d/code/p5/JS/day16 (master)
$ git remote -v
origin git@gitee.com:meng13666/laoshidaima.git (fetch)
origin git@gitee.com:meng13666/laoshidaima.git (push)
001@DESKTOP-18RGJTE MINGW64 /d/code/p5/JS/day16 (master)
$ git push origin master
To gitee.com:meng13666/laoshidaima.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'gitee.com:meng13666/laoshidaima.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
001@DESKTOP-18RGJTE MINGW64 /d/code/p5/JS/day16 (master)
$ git pull origin master --allow-unrelated-histories
From gitee.com:meng13666/laoshidaima
* branch master -> FETCH_HEAD
Merge made by the 'recursive' strategy.
README.en.md | 36 ++++++++++++++++++++++++++++++++++++
README.md | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 75 insertions(+)
create mode 100644 README.en.md
create mode 100644 README.md
001@DESKTOP-18RGJTE MINGW64 /d/code/p5/JS/day16 (master)
$ git push origin master
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 8 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 615 bytes | 307.00 KiB/s, done.
Total 5 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Powered by GITEE.COM [GNK-6.3]
To gitee.com:meng13666/laoshidaima.git
5264e2f..45a91a8 master -> master
git 本地与远程仓库连接 上传文件
最新推荐文章于 2024-05-05 14:33:24 发布