Generating patches? #85
-
@lamikr What's the command or tooling you use to generate patches? I'd like to make it so my patches match the format used in the repo, but despite fiddling around with many ways to make |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
No, I just use git format-patch, git commit --amend, git cherry-pick, patch -p1 < patch-name.patch and and other pretty regular commands. I do not like git merge commits, so I always try to make sure patches apply cleanly on top of the latest commit and therefore I use "git rebase and merge" strategy on github. I think I also once tested that squashing of multiple patches to one also worked. This is my common sequence for example to latest deepspeed patches.
If I need to make changes to patch, I usually at some point to compine them still to one patch if that makes logically sense. So if the first patch has been used to modify the DeepSpeed/build_and_install.sh for example and I need to make changes to it. Now I just created a new patch on bg74 pull request to modify the file created by that patch but at some point, I will propably compine them to single patch.
I do not think I have anything special on gitconfig either. (Sometimes I have had there commands to autoclean whitespaces, line-endings, etc. but not sure would they start cleaning whitespaces from patches that I commit on another patch...)
|
Beta Was this translation helpful? Give feedback.
-
Thanks. I'm not used to multiline commit messages so I was futzing around with the branch description, but there's no way to get the necessary output that way. For some reason I also didn't consider regenerating all the patches from the source in the |
Beta Was this translation helpful? Give feedback.
No, I just use git format-patch, git commit --amend, git cherry-pick, patch -p1 < patch-name.patch and and other pretty regular commands. I do not like git merge commits, so I always try to make sure patches apply cleanly on top of the latest commit and therefore I use "git rebase and merge" strategy on github. I think I also once tested that squashing of multiple patches to one also worked.
This is my common sequence for example to latest deepspeed patches.
Note that commands 1 and 2 can be compined to be just (git commit -s) but I quite
ofter use amend command to edit later the description part or tittle to fix typos.