Git报错:Your branch is up to date with 'originmaster'.

mac2022-06-30  29

Git在提交的时候报错 Your branch is up to date with 'origin/master'.

报错 Your branch is up to date with 'origin/master'. 具体如下:

原因:为了测试创建了空文件夹test、然后直接添加、然后提交就报错、直接原因是因为你的test文件夹为空

解决:在你的test文件夹中创建一个文件就OK了

1、 进入到test文件夹中 > cd ./test 2、 创建一个空文件 1.txt > touch 1.txt 3、 退回到项目根目录下 > cd ../ 4、 重修添加、提交、会发现提交成功 > git add ./test > git commit -m "提交测试文件夹 test"

转载于:https://www.cnblogs.com/laowenBlog/p/11167590.html

最新回复(0)