gitcode git指令

当前项目代码仓是空仓库

你可以通过克隆仓库开始或使用以下方式为你的项目添加文件:

或为你的项目添加以下文件:

添加 README.md添加 LICENSE添加 .gitignore

命令行指引

你还可以按照以下说明从你的电脑中上传现有文件或项目。

Git 全局设置

git config --global user.name "txwtech"
git config --global user.email "cdtxw@foxmail.com"

创建一个新仓库

git clone https://gitcode.com/txwtech/SugarTvision2.git
cd SugarTvision2
echo "# SugarTvision2" >> README.md
git add README.md
git commit -m "add README"
git branch -m main
git push -u origin main

推送现有的文件

cd existing_folder
git init
git remote add origin https://gitcode.com/txwtech/SugarTvision2.git
git add .
git commit -m "Initial commit"
git branch -m main
git push -u origin main

推送现有的 Git 仓库

cd existing_repo
git remote rename origin old-origin
git remote add origin https://gitcode.com/txwtech/SugarTvision2.git
git push -u origin --all
git push -u origin --tags

posted @ 2025-07-21 09:12  txwtech  阅读(10)  评论(2)    收藏  举报