Using the base operation in TortoiseGit
1. Execute the command: git pull origin feature/theme-store –rebase, use the base operation
PS e:\wwwroot\object> git pull origin feature/theme-store --rebase Error: cannot pull with rebase: you have unstaged changes. Error: Please commit or stash them.
2. Run git stash push, storage and modification.
PS E:\wwwroot\object> git stash push Saved working directory and index state wip on theme-store-wangqiang-20220215: DCBBE12BE add default section content_for_layout to render section settings PS e:\wwwroot\object>
3. Execute the base command again
PS e:\wwwroot\object> git pull origin feature/theme-store --rebase Remote: Enumrating Objects: 16, done. Remote: Counting Objects: 100% (16/16), done. Remote: Compressing Objects: 100% (13/13), done. Remote: Total 28 (delta 3), reused 2 (delta 2), pack-reused 12 unpacking objects: 100% (28/28), 93.32 KiB | 54.00 KiB/s, done. from https://xxx.com/xxx/object * branch feature/theme-store -> fetch_head dcbbe12be..f6709bcf5 feature/theme-store -> origin/feature/theme-store Updating DCBBE12BE..F6709BCF5 fast-forward .../json_schema/types/color_background.json | 12 + .../accessor/DelayedThemeSettingAccessor.php | 21 +- .../themeSetting/Schema/SettingTypeFactory.php | 1 + .../schema/types/colorbackgroundType.php | 9 + .../modules/themesetting/view/managesTemplate.php | 5 +- Platform/Composer.json | 15+- platform/composer.lock | 4901++++++++++++++++---- 7 files changed, 4150 insertions(+), 814 deletes(-) Create mode 100644 platform/modules/themesetting/resources/json_schema/types/color_background.json Create mode 100644 platform/modules/themesetting/schema/types/colorbackgroundType.php PS e:\wwwroot\object>
4. Run git stash pop to apply the storage and immediately throw it away from the stack. There is a conflict between the merge code.
PS E:\wwwroot\object> git stash pop auto-merging platform/composer.lock Conflict (Content): merge Conflict in platform/composer.lock auto-merging platform/composer.json Conflict (content): merge Conflict in platform/composer.json The stash entry is kept in case you need it again. PS E:\wwwroot\object> git status On branch feature/theme-store-wangqiang-20220215 your branch is ahead oforigin/feature/theme-store-wangqiang-20220215by 3 commits. (use "git push" to publish your local commits) Changes to be committed: (use "git restore --staged <file>..." to unstage) Modified: platform/.rnd modified: platform/app/http/kernel.php modified: platform/app/http/middleware/currenttheme.php modified: platform/app/providers/appserviceProvider.php modified: platform/app/services/pluginservice.php modified: platform/config/app.php modified: platform/config/modules.php modified: platform/phpunit.xml unmerged paths: (use "git restore --staged <file>..." to unstage) (use "git add <file>..." to mark resolution) both modified: platform/composer.json both modified: platform/composer.lock untracked files: (use "git add <file>..." to include in what will be committed) platform/composer.json.base.json platform/composer.json.local.json platform/composer.json.remote.json PS e:\wwwroot\object>
5. In TortoiseGit, git submits, there is a conflicting file: platform/composer.json, platform/composer.lock. as shown in Figure 1
6. Right-click there is a conflict file, use “head” to resolve the conflict. as shown in Figure 2
7. Are you sure you want to mark the conflicting file as resolved? Click directly on the button. as shown in Figure 3
8. Run git status, you can see that there is no conflict
PS E:\wwwroot\object> git status On branch feature/theme-store-wangqiang-20220215 your branch is ahead oforigin/feature/theme-store-wangqiang-20220215by 3 commits. (use "git push" to publish your local commits) Changes to be committed: (use "git restore --staged <file>..." to unstage) Modified: platform/.rnd modified: platform/app/http/kernel.php modified: platform/app/http/middleware/currenttheme.php modified: platform/app/providers/appserviceProvider.php modified: platform/app/services/pluginservice.php modified: platform/config/app.php modified: platform/config/modules.php modified: platform/phpunit.xml PS e:\wwwroot\object>
9. Check the git log, the base operation has been completed.
PS E:\wwwroot\object> git log commit f6709bcf51c8b95bba96f241ae369ed58d7ca585 (head -> feature/theme-store-wangqiang-20220215, origin/feature/theme-store) Author: Vidy Videni <vidy.videni@gmail.com> Date: Thu Feb 17 09:21:26 2022 +0800 Add color background type COMMIT 7CF1C1F9AC44EEC2FDDD2ED67984BC41D3062409 Author: Vidy Videni <vidy.videni@gmail.com> Date: Tue Feb 15 16:43:21 2022 +0800 Install Orchestra Asset Packages COMMIT A55B3DEC62C6305476AF07FC46FE82554E13A87 Author: Vidy Videni <vidy.videni@gmail.com> Date: Tue Feb 15 15:51:40 2022 +0800 Allow empty for themeettingAccessor commit dcbbe12be67a4defccfd444d45ba4eb67a363112 (origin/feature/theme-store-wangqiang-20220215, feature/theme-store) Author: Vidy Videni <vidy.videni@gmail.com> Date: Tue Feb 15 14:44:07 2022 +0800 Add default section content_for_layout to render section settings COMMIT A017D01D10273043ED31673E0630196FF7AE65CA PS e:\wwwroot\object>
10. Now you need to implement the corresponding operations of steps 2-4 in TortoiseGit. Steps 2 and 4 for reference: Using STASH in TortoiseGit
11. It is mainly the third step. After the second step is executed, the code is re-drawn, mainly to obtain the update of the upstream branch. The branch is the current local branch, and the upstream is the remote branch. as shown in Figure 4
git.exe checkout -f 1150e89205303e353ae0aab7cfcf045c2255b515 -- start Option 1: C9EA3F15AE0CFB4FA863053D9A30D8DA6A7BCB71 feat: In the basic information interface, add the field: ThemeAsset (get the content of the theme material) [detached HEAD 38666ec8d]feat: In the basic information interface, add the field: ThemeAsset (get the content of the theme material) Date: Thu Feb 17 11:28:20 2022 +0800 3 files changed, 70 inserts(+), 2 deletes(-) CREATE MODE 100644 Platform/modules/themestore/resolver/OnlineStoreEtheme/ThemeAssetResolver.php Option 2: 956B4341CD65D641BC35368C0A1F693D2083DC21 Perf: The path of the theme material, the backslash is converted to a forward slash [detached HEAD 04a85bfe1]Perf: The path of the theme material, the backslash is converted to a forward slash Date: Thu Feb 17 11:35:16 2022 +0800 1 file changed(-) Option 3: 85092D26901B1A731A888448168FC40A17EA75C2 test: In the Obtain the basic information interface of the theme, for the field: ThemeAsset (get the content of the theme material). Write a test [detached HEAD 0eb9bf7b9]test: In the Obtain the basic information interface of the theme, for the field: ThemeAsset (get the content of the theme material). Write a test Date: Thu Feb 17 15:42:07 2022 +0800 1 file changed, 31 inserts(+) git.exe checkout -f -b feature/theme-store-wangqiang-20220215 0EB9BF7B994A739AFF787DA3F2FFCAD193C3C -- git.exe reset --hard 0eb9bf7b994a739aff787da3f2ffcad193c3c --
12. Check the log, in line with expectations. as shown in Figure 5
13. If you need to keep the code of 2 branches when changing the base, you need to resolve the conflict before submitting. as shown in Figure 6
14. Are you sure you want to identify the conflicting file as resolved? Yes. as shown in Figure 7
15. Click the submit button again. as shown in Figure 8
16. The current commit will be empty (for example, due to conflict resolution). Skip this commit or just keep the commit message? Select Submit. as shown in Figure 9
17. The transformation is completed. As shown in Figure 10









