随笔分类 - git
摘要:本地预安装 全局安装 yarn global add commitizen 使用 git add . git cz Simply use git cz or just cz instead of git commit when committing. You can also use git-cz,
阅读全文
摘要:在空目录下新增 .gitkeep 的空文件 然后在 .gitignore 文件中新增: # Custom /xxdir/a
阅读全文
摘要:在 ubuntu 中如果对某个文件进行了加权限操作,比如 sudo chmod +x up.sh,那么这个操作会产生 git 文件变更,导致 git 会产生未提交的更改,通过以下方式,将文件的 executable 权限加到 git 中,就可以自动给该文件授予 executable 权限: http
阅读全文
摘要:https://linuxize.com/post/change-git-commit-message git push --force <remoteName> <branchName> // remoteName: origin
阅读全文
摘要:参考: https://blog.csdn.net/xs20691718/article/details/51901161 https://www.cnblogs.com/lfxiao/p/9378763.html
阅读全文
摘要:git 不能直接重命名远程分支,如果需要重命名则执行以下步骤操作: 重命名本地分支 删除远程分支 推送本地分支(重命名后的)到远程 额外说明: 1. 重命名后的分支也会保留历史 commit(应该是本地的 .git 文件夹中有历史记录) 2. 如果远程分支是默认分支,是不能直接删除的,需要先在提供
阅读全文
摘要:git initgit remote add origin repo-url git pull origin master --allow-unrelated-histories git add . git commit -m "初始化" git push -u origin master giti
阅读全文

浙公网安备 33010602011771号