git使用本地代码(已有项目)如何创建远程仓库

2024-11-05 10:57:47

1、 找到自己已有的项目文件夹下,空白处鼠标右键菜单中选择Git Bash Here

git使用本地代码(已有项目)如何创建远程仓库

3、 回到步骤1中弹出的命令行窗口中,输入git init 后回车

git使用本地代码(已有项目)如何创建远程仓库

5、 使用命令拉取master分支的代码: git pull origin master

git使用本地代码(已有项目)如何创建远程仓库

7、 提交代码: git commit -m 'init'

git使用本地代码(已有项目)如何创建远程仓库

9、 回到托管网站查看更新的代码显示如图所示

git使用本地代码(已有项目)如何创建远程仓库
猜你喜欢