git 切换地址 提交代码

-- 查看当前项目git地址

git remote -v

-- 更新地址

git remote set-url origin 新地址

--继续查看是否更新成功

git remote -v

-- 如需切换分支:

-- 查看当前分支

扫描二维码关注公众号,回复: 9839512 查看本文章

git branch

-- 创建名为test_dev的新分支

git branch test_dev

-- 切换到test_dev分支

git checkout test_dev

-- 关联到服务器  这一步必须要

git push -u origin test_dev

-- 当前项目下所有文件add到暂存区

git add .

-- 提交代码

git commit -m '备注'

-- push到服务器

git push
 

参考:

https://www.jianshu.com/p/e25c763b9816

https://www.jianshu.com/p/39eb14877b2d

https://blog.csdn.net/yihanzhi/article/details/78801027

https://blog.csdn.net/weixin_44514665/article/details/91956785

发布了99 篇原创文章 · 获赞 55 · 访问量 32万+

猜你喜欢

转载自blog.csdn.net/torpidcat/article/details/104883637