使用git初始化本地仓库并提交到远程分支

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lenmpeng/article/details/83860768
1. 初始化本地仓库

git init

2. 将本地内容添加至git索引中

git add .

3. 将索引添加至本地仓库中

git commit -m "first commit"

4. 添加远程仓库路径

git remote add origin https://example.com/project.git 替换自己实际项目地址

5. 将本地内容push至远程仓库中

git push -u origin master

猜你喜欢

转载自blog.csdn.net/lenmpeng/article/details/83860768