刘git记录

该博客记录了使用Git进行GitLab项目操作的过程,包括克隆项目时遇到的认证问题及解决,在本地进行文件添加、提交,分支创建、切换、拉取、推送,以及处理分支合并冲突等操作,展示了完整的代码管理流程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

➜  Documents pbcopy < ~/.ssh/id_ed25519.pub
➜  Documents git clone git@gitlab.com:supersl/mpvue.git
Cloning into 'mpvue'...
The authenticity of host 'gitlab.com (35.231.145.151)' can't be established.
ECDSA key fingerprint is SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw.
Are you sure you want to continue connecting (yes/no)?
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
➜  Documents git clone https://gitlab.com/supersl/mpvue.git
Cloning into 'mpvue'...
Username for 'https://gitlab.com': 347283766@qq.com
Password for 'https://347283766@qq.com@gitlab.com':
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://gitlab.com/supersl/mpvue.git/'
➜  Documents
➜  Documents git clone https://gitlab.com/supersl/mpvue.git
Cloning into 'mpvue'...
Username for 'https://gitlab.com': skybin0
Password for 'https://skybin0@gitlab.com':
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://gitlab.com/supersl/mpvue.git/'
➜  Documents git clone git@gitlab.com:supersl/mpvue.git
Cloning into 'mpvue'...
The authenticity of host 'gitlab.com (35.231.145.151)' can't be established.
ECDSA key fingerprint is SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'gitlab.com,35.231.145.151' (ECDSA) to the list of known hosts.
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), done.
➜  Documents mpvue
➜  mpvue git:(master) ✗ git fetch origin master
From gitlab.com:supersl/mpvue
 * branch            master     -> FETCH_HEAD
➜  mpvue git:(master) ✗ git add .
➜  mpvue git:(master) ✗ git commit -m '11:30'
[master 2fc0af7] 11:30
 Committer: 史佳宾 <skybin@shijiabindeMBP.lan>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:

    git config --global --edit

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 71 files changed, 16618 insertions(+), 1 deletion(-)
 create mode 100644 .gitignore
 rewrite README.md (100%)
 mode change 100644 => 100755
 create mode 100755 build/build.js
 create mode 100755 build/check-versions.js
 create mode 100755 build/dev-client.js
 create mode 100755 build/dev-server.js
 create mode 100755 build/utils.js
 create mode 100755 build/vue-loader.conf.js
 create mode 100755 build/webpack.base.conf.js
 create mode 100755 build/webpack.dev.conf.js
 create mode 100755 build/webpack.prod.conf.js
 create mode 100755 build/webpack.test.conf.js
 create mode 100755 config/dev.env.js
 create mode 100755 config/index.js
 create mode 100755 config/prod.env.js
 create mode 100755 config/test.env.js
 create mode 100755 index.html
 create mode 100755 package-lock.json
 create mode 100755 package.json
 create mode 100755 package.swan.json
 create mode 100755 project.config.json
 create mode 100755 project.swan.json
 create mode 100755 server.zip
 create mode 100755 server/.eslintrc.json
 create mode 100755 server/README.md
 create mode 100755 server/app.js
 create mode 100755 server/config.js
 create mode 100755 server/controllers/addbook.js
 create mode 100755 server/controllers/demo.js
 create mode 100755 server/controllers/index.js
 create mode 100755 server/controllers/login.js
 create mode 100755 server/controllers/message.js
 create mode 100755 server/controllers/tunnel.js
 create mode 100755 server/controllers/upload.js
 create mode 100755 server/controllers/user.js
 create mode 100755 server/middlewares/response.js
 create mode 100755 server/nodemon.json
 create mode 100755 server/package-lock.json
 create mode 100755 server/package.json
 create mode 100755 server/process.prod.json
 create mode 100755 server/qcloud.js
 create mode 100755 server/routes/index.js
 create mode 100755 server/tools.md
 create mode 100755 server/tools/cAuth.sql
 create mode 100755 server/tools/initdb.js
 create mode 100755 src/App.vue
 create mode 100755 src/app.json
 create mode 100755 src/config.js
 create mode 100755 src/main.js
 create mode 100755 src/pages/books/books.vue
 create mode 100755 src/pages/books/main.js
 create mode 100755 src/pages/comments/comments.vue
 create mode 100755 src/pages/comments/main.js
 create mode 100755 src/pages/index/index.vue
 create mode 100755 src/pages/index/main.js
 create mode 100755 src/util.js
 create mode 100755 src/weui.css
 create mode 100755 static/.gitkeep
 create mode 100755 static/images/user.png
 create mode 100755 static/tabs/home-active.png
 create mode 100755 static/tabs/home.png
 create mode 100755 static/tabs/orders-active.png
 create mode 100755 static/tabs/orders.png
 create mode 100755 test/e2e/custom-assertions/elementCount.js
 create mode 100755 test/e2e/nightwatch.conf.js
 create mode 100755 test/e2e/runner.js
 create mode 100755 test/e2e/specs/test.js
 create mode 100755 test/unit/.eslintrc
 create mode 100755 test/unit/index.js
 create mode 100755 test/unit/karma.conf.js
 create mode 100755 test/unit/specs/Hello.spec.js
➜  mpvue git:(master) git push origin master
Enumerating objects: 96, done.
Counting objects: 100% (96/96), done.
Delta compression using up to 8 threads
Compressing objects: 100% (86/86), done.
Writing objects: 100% (94/94), 8.35 MiB | 206.00 KiB/s, done.
Total 94 (delta 4), reused 0 (delta 0)
To gitlab.com:supersl/mpvue.git
   42945b7..2fc0af7  master -> master
➜  mpvue git:(master) git add .
➜  mpvue git:(master) ✗ git commit -m '5555'
[master 9beb39d] 5555
 Committer: 史佳宾 <skybin@shijiabindeMBP.lan>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:

    git config --global --edit

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 1 file changed, 1 insertion(+), 1 deletion(-)
➜  mpvue git:(master) git push origin master
Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 8 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 546 bytes | 546.00 KiB/s, done.
Total 6 (delta 3), reused 0 (delta 0)
To gitlab.com:supersl/mpvue.git
   2fc0af7..9beb39d  master -> master
➜  mpvue git:(master) git checkout delvelop
error: pathspec 'delvelop' did not match any file(s) known to git
➜  mpvue git:(master) git fetch
From gitlab.com:supersl/mpvue
 * [new branch]      delvelop   -> origin/delvelop
➜  mpvue git:(master) git checkout delvelop
Branch 'delvelop' set up to track remote branch 'delvelop' from 'origin'.
Switched to a new branch 'delvelop'
➜  mpvue git:(delvelop) git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
➜  mpvue git:(master) git checkout delvelop
Switched to branch 'delvelop'
Your branch is up to date with 'origin/delvelop'.
➜  mpvue git:(delvelop) git add .
➜  mpvue git:(delvelop) git commit -m 'shishsihi'
On branch delvelop
Your branch is up to date with 'origin/delvelop'.

nothing to commit, working tree clean
➜  mpvue git:(delvelop) git push origin delvelop
To gitlab.com:supersl/mpvue.git
 ! [rejected]        delvelop -> delvelop (fetch first)
error: failed to push some refs to 'git@gitlab.com:supersl/mpvue.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
➜  mpvue git:(delvelop) git fetch origin delvelop
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 6 (delta 3), reused 0 (delta 0)
Unpacking objects: 100% (6/6), done.
From gitlab.com:supersl/mpvue
 * branch            delvelop   -> FETCH_HEAD
   2fc0af7..ce936e6  delvelop   -> origin/delvelop
➜  mpvue git:(delvelop) git pull origin delvelop
From gitlab.com:supersl/mpvue
 * branch            delvelop   -> FETCH_HEAD
Updating 2fc0af7..ce936e6
Fast-forward
 src/pages/books/books.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
➜  mpvue git:(delvelop) git add .
➜  mpvue git:(delvelop) ✗ git commit -m '11:50'
[delvelop 5f5c2c8] 11:50
 Committer: 史佳宾 <skybin@shijiabindeMBP.lan>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:

    git config --global --edit

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 1 file changed, 1 insertion(+), 1 deletion(-)
➜  mpvue git:(delvelop) git push origin delvelop
Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 8 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 553 bytes | 553.00 KiB/s, done.
Total 6 (delta 3), reused 0 (delta 0)
remote:
remote: To create a merge request for delvelop, visit:
remote:   https://gitlab.com/supersl/mpvue/merge_requests/new?merge_request%5Bsource_branch%5D=delvelop
remote:
To gitlab.com:supersl/mpvue.git
   ce936e6..5f5c2c8  delvelop -> delvelop
➜  mpvue git:(delvelop) git fetch origin master
From gitlab.com:supersl/mpvue
 * branch            master     -> FETCH_HEAD
➜  mpvue git:(delvelop) git pull origin master
From gitlab.com:supersl/mpvue
 * branch            master     -> FETCH_HEAD
Auto-merging src/pages/books/books.vue
CONFLICT (content): Merge conflict in src/pages/books/books.vue
Automatic merge failed; fix conflicts and then commit the result.
➜  mpvue git:(delvelop) ✗ git add .
➜  mpvue git:(delvelop) ✗ git commit -m 'de-mahebing'
[delvelop 3a8f579] de-mahebing
 Committer: 史佳宾 <skybin@shijiabindeMBP.lan>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:

    git config --global --edit

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

➜  mpvue git:(delvelop) git push origin delvelop
Enumerating objects: 16, done.
Counting objects: 100% (16/16), done.
Delta compression using up to 8 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 726 bytes | 726.00 KiB/s, done.
Total 6 (delta 2), reused 0 (delta 0)
remote:
remote: To create a merge request for delvelop, visit:
remote:   https://gitlab.com/supersl/mpvue/merge_requests/new?merge_request%5Bsource_branch%5D=delvelop
remote:
To gitlab.com:supersl/mpvue.git
   5f5c2c8..3a8f579  delvelop -> delvelop
➜  mpvue git:(delvelop) git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
➜  mpvue git:(master) git fetch origin delvelop
From gitlab.com:supersl/mpvue
 * branch            delvelop   -> FETCH_HEAD
➜  mpvue git:(master) git pull origin delvelop
From gitlab.com:supersl/mpvue
 * branch            delvelop   -> FETCH_HEAD
Updating 9beb39d..3a8f579
Fast-forward
 src/pages/books/books.vue | 4 ++++
 1 file changed, 4 insertions(+)
➜  mpvue git:(master)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值