随笔分类 -  git

摘要:缘起:因为经济寒冬的原因,需要迁移代码到我自己的电脑上。背景环境:Ubuntu迁移操作:1. 先删除本地除.git文件夹以外的文件,避免压缩包过大sudo rm -rf !(.git*)2. 压缩打包sudo tar -vzcf Android.tgz Android3. 异地解压缩sudo tar 阅读全文
posted @ 2024-02-26 15:08 hkingsp 阅读(29) 评论(0) 推荐(0) 编辑
摘要:一、缘起: 我有一些修改涉及到旧的commit,我想把这种同类的修改放在一起,这就需要我把原来的commit放在"TOP"的位置。图示:这是我原来的commit: C1-C2-C_TARGET-C3-C4 我想将它变成: C1-C2-C3-C4-C_TARGET 二、进入我的测试git repo,我 阅读全文
posted @ 2024-02-21 09:34 hkingsp 阅读(817) 评论(0) 推荐(0) 编辑
摘要:一、git tag and describe 1. Create a tag with patterned name git tag "tagname_v1.02" (one tag is pointed to a specified commit) 2. get tag describe to u 阅读全文
posted @ 2023-12-11 10:16 hkingsp 阅读(9) 评论(0) 推荐(0) 编辑
摘要:1. 用git stash存储modified files cd Android git stash 2. check stash list git stash list 3. 删除除了.git .gitattributes .gitignore的所有文件 添加bash扩展,可以执行更复杂的rm命令 阅读全文
posted @ 2023-11-21 10:04 hkingsp 阅读(51) 评论(0) 推荐(0) 编辑
摘要:check status of all untracked files:git status -unocheck status of specified folder:git stats <directory>example:git status .clean untracked files of 阅读全文
posted @ 2022-05-31 11:40 hkingsp 阅读(35) 评论(0) 推荐(0) 编辑
摘要:add submodule: git submodule add <remote_url> <destination_folder>list all submodules:git submodule status --recursiveclone all submodules:git clone - 阅读全文
posted @ 2021-08-11 14:43 hkingsp 阅读(238) 评论(0) 推荐(0) 编辑
摘要:1. show commit and author of each line of a file( last modified ):git blame path/to/file参考资料:git官方:https://git-scm.com/docs/git-blamewhat blame do ?ht 阅读全文
posted @ 2021-07-07 13:21 hkingsp 阅读(137) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示