1. 查看远程仓库地址
git remote -v
2. 修改远程仓库地址
确保 origin
指向你的 Gitee 仓库,如果不是,修改远程地址。
git remote set-url origin https://gitee.com/***/project.git
3. 查看本地分支
git branch
4. 推送所有本地分支
git push --all origin
5. 推送当前分支并关联远程
git push -u origin 分支名
总结:
mkdir flow-statistics
cd flow-statistics
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote -v
git remote set-url origin https://gitee.com/***/project.git
git branch
git push --all origin