- git init # 初始化本地仓库
- git add ./ # 将文件添加到待提交区域
- git commit -m “提交信息” # 提交
- 使用GitHub创建仓库(new Repository)
- ssh-keygen -t rsa -C “youremail@example.com” # 创建SSH-Key
将本地用户目录(用户目录/.ssh/id_rsa.pub)的ssh公钥添加到GitHub中
git remote add origin git@github.com:2571503519/MedicalFee-Manage.git # 将远程仓库与本地仓库建立连接
- git pull origin master –allow-unrelated-histories # 首先将远程仓库的文件pull下来
- git push origin master # 将本地提交同步到远程仓库
Git创建本地仓库并与远程仓库建立连接
最新推荐文章于 2024-07-07 17:34:31 发布