一、git commit -m 提交问题
当在git提交时提示下面报错,是因为当前不符合git commit提交规范导致
解决方法
更改git commit提交格式
例:git commit -m 'feat(api): add 修改内容'
二、git更换仓库
在Git中更换仓库,要重新设置远程仓库的URL。
更改的步骤:
-
打开终端(Terminal)或命令提示符(Command Prompt)。
-
切换到你的本地仓库的目录中。
-
使用
git remote -v
查看当前远程仓库的URL。 -
使用
git remote set-url
命令来更改远程仓库的URL
git remote -v # 查看当前远程仓库
git remote set-url origin https://github.com/newuser/newrepo.git # 更改远程仓库URL
git remote -v # 再次查看,确认更改