将现有文件夹推送新 git 仓库、推送现有 git 仓库到新仓库、初始化 git 仓库
创建一个新仓库
git clone <git-url>
cd git_folder
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 <git-url>
git add .
git commit -m "Initial commit"
git push -u origin master
推送现有的 Git 仓库
cd existing_repo
git remote rename origin old-origin
git remote add origin <git-url>
git push -u origin --all
git push -u origin --tags
本文作者:Zijian/TENG(微信公众号:好记性如烂笔头),转载请注明原文链接:https://www.cnblogs.com/tengzijian/p/16330772.html