随笔分类 -  git 版本控制学习

摘要:git rm --cached composer.lockgit commit -m "delete composer.lock 阅读全文
posted @ 2023-05-24 11:22 没事就更 阅读(29) 评论(0) 推荐(0)
摘要:1.找到要回退的版本号(右击项目--> Git --> Show History -->选中要回退的版本-->Copy Revision Number); 2.打开idea的Terminal 输入命令 git reset --hard 139dcfaa558e3276b30b6b2e5cbbb9c0 阅读全文
posted @ 2022-08-25 14:26 没事就更 阅读(3692) 评论(0) 推荐(1)
摘要:1.git pull 更新代码,发现 error: Your local changes to the following files would be overwritten by merge:pom.xml Please commit your changes or stash them bef 阅读全文
posted @ 2021-06-16 14:32 没事就更 阅读(380) 评论(0) 推荐(0)
摘要:原文链接:https://www.cnblogs.com/liuzheyan/p/11447300.html 1.git remote 不带参数,列出已经存在的远程分支 2.git remote -v | --verbose 列出详细信息,在每一个名字后面列出其远程url,此时, -v 选项(译注: 阅读全文
posted @ 2020-12-01 11:59 没事就更 阅读(964) 评论(0) 推荐(0)
摘要:比如我在windows下用git clone gitURL 就提示 SSL certificate problem: self signed certificate 这种问题,在windows下出现得频率高些。我估计主要是git本身就是基于linux开发的,在windows上,容易缺失一些环境。 参 阅读全文
posted @ 2020-08-01 20:36 没事就更 阅读(2502) 评论(0) 推荐(0)
摘要:有新人加入项目时,改动一些方法,此时并不想提交,但是需要拉取最新的代码。有些人会删除本地的项目,重新clone的项目。虽然,这样能够完成更新项目的做法; 接下来介绍更加科学的做法: git fetch --allgit reset --hard origin/mastergit pullgit fe 阅读全文
posted @ 2020-06-22 19:04 没事就更 阅读(4750) 评论(0) 推荐(0)
摘要://查看当前所有分支 *为当前分支 git branch //切换并新建分支liruning git checkout -b liruning //分支创建完毕,将本地分支推送到远程(注意:并不是创建远程新分支,推送本地分支即可) git push --set-upstream origin lir 阅读全文
posted @ 2020-05-21 15:10 没事就更 阅读(1261) 评论(0) 推荐(0)
摘要:项目更目录下 vim .git/config [user] name = hanzaixing email = hanzaixing@btte.net 阅读全文
posted @ 2020-02-19 22:08 没事就更 阅读(530) 评论(0) 推荐(0)
摘要:1、将.gitignore 备份出来 ,移除 2、将想要忽略,却已经标记的文件删除,再讲.gitignore 拷贝回来。应该就ok了 阅读全文
posted @ 2020-01-07 14:30 没事就更 阅读(183) 评论(0) 推荐(0)
摘要:composer config -g -l 阅读全文
posted @ 2019-12-24 14:33 没事就更 阅读(4535) 评论(0) 推荐(0)
摘要:执行指令: 执行指令: 1 2 [Sun@webserver2 demo]$ git update-index --assume-unchanged config.conf [Sun@webserver2 demo]$ git status 此时忽略config.conf文件跟踪之后再查看状态,发现 阅读全文
posted @ 2019-10-18 16:31 没事就更 阅读(3405) 评论(0) 推荐(0)