[英]How do I push new code to an existing repo? (as a new branch)
How do I do that?我怎么做?
The question's a bit vague but something like this should work (using Bash):这个问题有点含糊,但这样的事情应该可以工作(使用 Bash):
Create a new branch in your existing repo在现有仓库中创建一个新分支
git checkout -b $new_branch
Copy/move the new code into the repo将新代码复制/移动到存储库中
cp $new_code.
Commit and push提交并推送
git commit -am "Create $new_branch from external work in $new_code" git push -u origin $new_branch
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.