Loading

Git将已存在的文件推到新创建的仓库中

Existing folder

cd existing_folder
git init
git remote add origin http://仓库地址.git
git add .
git commit -m "Initial commit"
git push -u origin master

Existing Git repository

cd existing_repo
git remote rename origin old-origin
git remote add origin http://仓库地址.git
git push -u origin --all
git push -u origin --tags
posted @ 2021-11-16 12:30  IT搬瓦工  阅读(164)  评论(0编辑  收藏  举报