I have a git branch that I've made some code changes on. However, I've decided that I need to change the command I've added ( static_cast
) to a newer command ( narrow_cast
).
I made a lot of these changes so what I want to do is write a script that:
static_cast
to narrow_cast
in these changes. Is this possible? If so, how?
did you try :
this will list all your changes , this is also kind of a patch that you can apply again to your code
in redo_all.patch change the static_cast to narrow_cast (edit replace all .. be careful with replace all)
then create a new branch at same start point
at this point you have a new branch with the correct modifications
advantage of this : you have your old modif on a branch and the new ons on another branch... then when you checked everything is ok you can work to change the branches names
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.