赞
踩
git clone your_repo.git
- Cloning into 'ultralytics'...
- remote: Enumerating objects: 8834, done.
- remote: Counting objects: 100% (177/177), done.
- remote: Compressing objects: 100% (112/112), done.
- remote: Total 8834 (delta 91), reused 126 (delta 65), pack-reused 8657
- Receiving objects: 100% (8834/8834), 4.78 MiB | 49.00 KiB/s, done.
- Resolving deltas: 100% (5859/5859), done.
- cd ./your_repo
- git branch your_branch_name
- git checkout your_branch_name
这么做是为了清晰明了,而不会是'your_repo/main'->'main_repo/main'这种容易混淆的PR形式.
在你修改代码的时候,可能主仓已经进行了别的更新,合并了其他开发者的分支,所以在提交之前,需要再拉一次主仓代码防止冲突
- git stash
- git pull
- git stash pop
- git commit -am "ORT-CPP add the example table"
- git push -f
(base) PS E:\project\Project_C++\ultralytics> git stash
Saved working directory and index state WIP on ORT-CPP: 51d4d69 Merge branch 'main' into ORT-CPP
(base) PS E:\project\Project_C++\ultralytics> git pull
Already up to date.
(base) PS E:\project\Project_C++\ultralytics> git stash pop
On branch ORT-CPP
Your branch is up to date with 'origin/ORT-CPP'.Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: examples/README.mdno changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (624d556c338c43ad4f515a32595783f5ae3cf443)
(base) PS E:\project\Project_C++\ultralytics> git commit -am "ORT-CPP add the example table"
[ORT-CPP 131a8f9] ORT-CPP add the example table
1 file changed, 1 insertion(+)
(base) PS E:\project\Project_C++\ultralytics> git push --set-upstream origin delete-unused-link
error: src refspec delete-unused-link does not match any
error: failed to push some refs to 'https://github.com/DennisJcy/ultralytics.git'
(base) PS E:\project\Project_C++\ultralytics> git push -f
warning: ----------------- SECURITY WARNING ----------------
warning: | TLS certificate verification has been disabled! |
warning: ---------------------------------------------------
warning: HTTPS connections may not be secure. See https://aka.ms/gcm/tlsverify for more information.
warning: ----------------- SECURITY WARNING ----------------
warning: | TLS certificate verification has been disabled! |
warning: ---------------------------------------------------
warning: HTTPS connections may not be secure. See https://aka.ms/gcm/tlsverify for more information.
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 12 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 461 bytes | 461.00 KiB/s, done.
Total 4 (delta 3), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
To https://github.com/DennisJcy/ultralytics.git
51d4d69..131a8f9 ORT-CPP -> ORT-CPP
进入你的Github主页,首先进入你fork下来的仓库
https://github.com/your_name/your_repo
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。