gpt4 book ai didi

git - 我想推送到一个不是 master 的分支。那就是我所做的

转载 作者:太空狗 更新时间:2023-10-29 13:54:59 27 4
gpt4 key购买 nike

git init
git add .
git commit -m "first"
git push origin ritu

(第二个是分支的名称)但是它说

fatal: origin does not appear to be a git repository.
fatal: could not read from remote repository.
Please sure you have the correct access rights and the repository exists.

最佳答案

你必须先添加远程,你可能还想先创建一个本地分支,所以完整:

git init
git remote add origin <url>

# or, instead if init+remote: git clone <url>

git add ...
git commit
git branch ritu
git push origin ritu

关于git - 我想推送到一个不是 master 的分支。那就是我所做的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38720122/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com