在你需要推送的那个文件夹打开

#创建本地仓库
git init
#添加文件并首次提交
git add .
git commit -m "Initial commit"
#添加远程仓库地址
git remote add origin https://gitee.com/你的用户名/你的仓库名.git
#查看远程仓库是否设置chengg
git remote -v
#原来远程仓库有文件先拉取
git pull origin master --allow-unrelated-histories
选取默认的 esc :wq
git commit -m "Merge remote changes"
git push -u origin master
#强制推送(慎用)如果你确定远程仓库中的内容不重要,并且希望完全覆盖远程仓库的内容,可以使用以下命令
#强制推送:
git push -u origin master --force
也可以在你的idea正常推送了

