为了标识身份,建议先完成 Git 全局设置
git config --global user.name "xxxxxx"
git config --global user.email "xxxxxx@qq.com"
方式一:克隆仓库
git clone https://xxx.xxxxx.com/xxxxxx/xxx.git
cd xxx
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
方式二:已有文件夹或仓库
cd existing_folder
git init
git remote add origin https://xxx.xxxxx.com/xxxxxx/xxx.git
git add .
git commit
git push -u origin master
方式三:导入代码库
git clone --bare https://git.example.com/your/project.git your_path
cd your_path
git remote set-url origin https://xxx.xxxxx.com/xxxxxx/xxx.git
git push origin --tag && git push origin --all
标签:origin,git,--,com,xxx,Git,xxxxxx,上传,远程
From: https://www.cnblogs.com/WinterPasser/p/17613716.html