# Dọn dẹp source PosApp cũ ## Các nhánh chính > origin/APP-FB/develop origin/APP-REPORT/develop origin/APP-RETAIL/develop origin/APP-WINDOW/develop origin/APP-SPA/develop ## Chưa merge vào APP-FB/develop, nhưng loại trừ: APP-FB/release, APP-REPORT, APP-RETAIL, WINDOW-FB, APP-WINDOW, APP-SPA ```bash= git branch -r --no-merged origin/APP-FB/develop | grep -Ev 'origin/(APP-FB/release|APP-REPORT|APP-RETAIL|WINDOW-FB|APP-WINDOW|APP-SPA)' ``` => 209 branches: > origin/APP-FB/develop_update origin/APP-FB/feature/162_order_customer_screen origin/APP-FB/feature/FB_178_review_on_store origin/APP-FB/feature/FB_SPA-284_apply_multiple_voucher origin/APP-FB/feature/FB_SPA-288_update_result_of_print_kitchen origin/APP-FB/feature/FB_add_param_sync_order origin/APP-FB/feature/FB_apply_promotion_by_customer origin/APP-FB/feature/FB_chuk_chuk_app origin/APP-FB/feature/FB_chukchuk_app_test origin/APP-FB/feature/FB_delete_sale_channel_setting origin/APP-FB/feature/FB_filter_promotion origin/APP-FB/feature/FB_fix_topping origin/APP-FB/feature/FB_promotion_ui origin/APP-FB/feature/FB_remove_device_type_SO_PdaPos origin/APP-FB/feature/FB_restore_notify_version_app origin/APP-FB/feature/FB_restore_promotion origin/APP-FB/feature/FB_round_up_bill origin/APP-FB/feature/FB_support_report_bill_for_windows origin/APP-FB/feature/FB_sync_device_infor origin/APP-FB/feature/FB_time_service origin/APP-FB/feature/FB_time_service_clone origin/APP-FB/feature/FB_web_order_link origin/APP-FB/feature/SPA-180 origin/APP-FB/feature/SPA-188 origin/APP-FB/feature/SPA-191 origin/APP-FB/feature/SPA-195 origin/APP-FB/feature/SPA-199 origin/APP-FB/feature/SPA-201 origin/APP-FB/feature/SPA-203 origin/APP-FB/feature/SPA-209 origin/APP-FB/feature/SPA-211 origin/APP-FB/feature/SPA-216 origin/APP-FB/feature/SPA-218 origin/APP-FB/feature/SPA-227 origin/APP-FB/feature/SPA-232 origin/APP-FB/feature/SPA-234 origin/APP-FB/feature/SPA-244 origin/APP-FB/feature/SPA-250 origin/APP-FB/feature/SPA-255 origin/APP-FB/feature/SPA-261 origin/APP-FB/feature/SPA-261-dev origin/APP-FB/feature/SPA-264 origin/APP-FB/feature/SPA-270 origin/APP-FB/feature/SPA-275 origin/APP-FB/feature/SPA-281 origin/APP-FB/feature/SPA-285 origin/APP-FB/feature/SPA-285-Clone origin/APP-FB/feature/SPA-289_food_status origin/APP-FB/feature/SPA-297 origin/APP-FB/feature/SPA-301 origin/APP-FB/feature/SPA-303 origin/APP-FB/feature/SPA-303_print origin/APP-FB/feature/SPA-303_template_print origin/APP-FB/feature/SPA-305 origin/APP-FB/feature/SPA-306 origin/APP-FB/feature/SPA-310 origin/APP-FB/feature/SPA-315 origin/APP-FB/feature/SPA-342 origin/APP-FB/feature/SPA-350 origin/APP-FB/feature/SPA-351 origin/APP-FB/feature/SPA-360 origin/APP-FB/feature/SPA-364 origin/APP-FB/feature/SPA-376-abccb origin/APP-FB/feature/SPA-376-luu-pending origin/APP-FB/feature/SPA-379 origin/APP-FB/feature/SPA-383 origin/APP-FB/feature/SPA-398 origin/APP-FB/feature/SPA-399 origin/APP-FB/feature/SPA-401 origin/APP-FB/feature/SPA-404 origin/APP-FB/feature/SPA-404-dev origin/APP-FB/feature/SPA-405 origin/APP-FB/feature/SPA-408 origin/APP-FB/feature/SPA-410 origin/APP-FB/feature/SPA-425 origin/APP-FB/feature/SPA-428 origin/APP-FB/feature/SPA-430 origin/APP-FB/feature/SPA-436 origin/APP-FB/feature/SPA-454 origin/APP-FB/feature/SPA-461 origin/APP-FB/feature/SPA-467 origin/APP-FB/feature/SPA-477 origin/APP-FB/feature/SPA-483 origin/APP-FB/feature/SPA-502 origin/APP-FB/feature/SPA-504 origin/APP-FB/feature/SPA-507 origin/APP-FB/feature/SPA-507-dev origin/APP-FB/feature/SPA-509 origin/APP-FB/feature/SPA-516 origin/APP-FB/feature/SPA-519 origin/APP-FB/feature/SPA-529 origin/APP-FB/feature/SPA-535 origin/APP-FB/feature/SPA-541 origin/APP-FB/feature/SPA-560 origin/APP-FB/feature/SPA-561 origin/APP-FB/feature/SPA-567 origin/APP-FB/feature/SPA-567-in-usb origin/APP-FB/feature/SPA-571-clone origin/APP-FB/feature/SPA-588 origin/APP-FB/feature/SPA-588-dev origin/APP-FB/feature/SPA-589 origin/APP-FB/feature/SPA-592-clone origin/APP-FB/feature/SPA-600 origin/APP-FB/feature/SPA-610-backup origin/APP-FB/feature/SPA-621 origin/APP-FB/feature/SPA-623 origin/APP-FB/feature/SPA-624 origin/APP-FB/feature/SPA-637-backup origin/APP-FB/feature/SPA-639 origin/APP-FB/feature/SPA-646 origin/APP-FB/feature/SPA-649 origin/APP-FB/feature/SPA-673 origin/APP-FB/feature/SPA-698 origin/APP-FB/feature/SPA-710 origin/APP-FB/feature/SPA-717 origin/APP-FB/feature/SPA-740 origin/APP-FB/feature/SPA-740-dev origin/APP-FB/feature/SPA-741 origin/APP-FB/feature/SPA-745 origin/APP-FB/feature/SPA-751 origin/APP-FB/feature/SPA-753 origin/APP-FB/feature/SPA-782 origin/APP-FB/feature/TT14052 origin/APP-FB/feature/add_bill_note_to_kitchen_bill origin/APP-FB/feature/add_button_confirm_order_online origin/APP-FB/feature/add_delete_order_local origin/APP-FB/feature/add_electronic_scale origin/APP-FB/feature/add_event_name_of_order origin/APP-FB/feature/add_ip_user_agent_to_header origin/APP-FB/feature/add_linter origin/APP-FB/feature/add_open_cash_in_shift origin/APP-FB/feature/add_print_time_in_bill origin/APP-FB/feature/add_second_screen_top_up origin/APP-FB/feature/add_send_order_no_print_bill origin/APP-FB/feature/add_size80_bluetooth_printer origin/APP-FB/feature/add_template_zalo_osc origin/APP-FB/feature/all_branch_D origin/APP-FB/feature/amthuc_tran origin/APP-FB/feature/auto_create_topup origin/APP-FB/feature/build_for_llq origin/APP-FB/feature/build_stupid_pos origin/APP-FB/feature/check_merge_table origin/APP-FB/feature/chukchuk_set_default_asset_update origin/APP-FB/feature/close_shift_different_day origin/APP-FB/feature/enable_auto_update_order origin/APP-FB/feature/error_banner origin/APP-FB/feature/feedback_dish_status_21_02 origin/APP-FB/feature/fix_bill_payment_with_sale_channel origin/APP-FB/feature/fix_close_shift origin/APP-FB/feature/fix_create_customer_offline origin/APP-FB/feature/fix_import_export_warehouse origin/APP-FB/feature/fix_in_dkt origin/APP-FB/feature/fix_inventory_warehouse origin/APP-FB/feature/fix_kds origin/APP-FB/feature/fix_kitchen_sticker origin/APP-FB/feature/fix_language_productName origin/APP-FB/feature/fix_login_error origin/APP-FB/feature/fix_manage_dish origin/APP-FB/feature/fix_merge_order_zz origin/APP-FB/feature/fix_one_staff_one_order origin/APP-FB/feature/fix_order_online_debt origin/APP-FB/feature/fix_print_momo_qr origin/APP-FB/feature/fix_print_sticker_hk316 origin/APP-FB/feature/fix_printer_bluetooth origin/APP-FB/feature/fix_promotion origin/APP-FB/feature/fix_scan_order_online origin/APP-FB/feature/fix_scan_osc origin/APP-FB/feature/fix_shiftid_when_open_shift origin/APP-FB/feature/fix_sync_pda origin/APP-FB/feature/fix_tax_of_product_in_bill origin/APP-FB/feature/fix_topup_api origin/APP-FB/feature/fix_ui_sale_channel_setting origin/APP-FB/feature/fix_xprinter_usb origin/APP-FB/feature/handle_error_status_api origin/APP-FB/feature/improve_cancel_bill_and_return_bill origin/APP-FB/feature/improve_kds origin/APP-FB/feature/improve_order_temp origin/APP-FB/feature/improve_revenue_bill_29_07_2024 origin/APP-FB/feature/list_debt origin/APP-FB/feature/list_grab_and_online origin/APP-FB/feature/log_info_usbdevice origin/APP-FB/feature/log_local_sync origin/APP-FB/feature/multi_select_dual_screen origin/APP-FB/feature/payment_pda_sync_clone origin/APP-FB/feature/prevent_wrong_price origin/APP-FB/feature/return_order origin/APP-FB/feature/save_temp_order_crash origin/APP-FB/feature/set_default_asset origin/APP-FB/feature/show_customer_detail_at_shop origin/APP-FB/feature/show_full_product_name_in_sticker origin/APP-FB/feature/topping origin/APP-FB/feature/update_barcode_template origin/APP-FB/feature/update_db_app_pc origin/APP-FB/feature/update_flow_payment_mpos origin/APP-FB/feature/update_flutter_2 origin/APP-FB/feature/update_print_temp origin/APP-FB/fix/SPA-797 origin/HEAD -> origin/master origin/SPA-582-temp origin/SPA-75-InputWareHouse origin/THAIHUONG origin/feature/FB_SPA_103_zalo_payment origin/feature/SPA-32-webview origin/feature/SPA-571 origin/feature/THAIHUONG_updateAccount origin/fix-connectivity-plus origin/main origin/master origin/test-window ## Chưa merge vào APP-REPORT/develop, nhưng loại trừ: APP-FB/release, APP-FB, APP-RETAIL, WINDOW-FB, APP-WINDOW, APP-SPA ```bash= git branch -r --no-merged origin/APP-REPORT/develop | grep -Ev 'origin/(APP-FB/release|APP-FB|APP-RETAIL|WINDOW-FB|APP-WINDOW|APP-SPA)' ``` => 19 branches: > origin/APP-REPORT/feature/SPA-600 origin/APP-REPORT/feature/SPA-648 origin/APP-REPORT/feature/SPA-658 origin/APP-REPORT/feature/clean_project origin/APP-REPORT/release/version_1.1.2+4 origin/HEAD -> origin/master origin/SPA-32_utilities origin/SPA-582-temp origin/SPA-75-InputWareHouse origin/THAIHUONG origin/feature/FB_SPA_103_zalo_payment origin/feature/SPA-32-webview origin/feature/SPA-571 origin/feature/THAIHUONG_updateAccount origin/feature/fix_android12_cant_lanch origin/fix-connectivity-plus origin/main origin/master origin/test-window ## Chưa merge vào APP-RETAIL/develop, nhưng loại trừ: APP-FB/release, APP-FB, APP-REPORT, WINDOW-FB, APP-WINDOW, APP-SPA ```bash= git branch -r --no-merged origin/APP-RETAIL/develop | grep -Ev 'origin/(APP-FB/release|APP-FB|APP-REPORT|WINDOW-FB|APP-WINDOW|APP-SPA)' ``` => 35 branches: > origin/APP-RETAIL/feature/RETAIL-219 origin/APP-RETAIL/feature/RETAIL-220 origin/APP-RETAIL/feature/SPA-233 origin/APP-RETAIL/feature/SPA-327 origin/APP-RETAIL/feature/SPA-393 origin/APP-RETAIL/feature/SPA-410 origin/APP-RETAIL/feature/SPA-479 origin/APP-RETAIL/feature/SPA-567 origin/APP-RETAIL/feature/add_option_dialog_print_shift origin/APP-RETAIL/feature/display_vat_product_when_select origin/APP-RETAIL/feature/fix_electric_scale origin/APP-RETAIL/feature/fix_return_bill_0d origin/APP-RETAIL/feature/fix_xprinter_usb origin/APP-RETAIL/feature/merge_report_fnb origin/APP-RETAIL/feature/show_inventory_in_order_item origin/APP-RETAIL/release/version_1.0.0+1 origin/APP-RETAIL/release/version_1.0.3+4 origin/APP-RETAIL/release/version_4.0.0+13 origin/APP-RETAIL/release/version_4.4.0+17 origin/APP-RETAIL/release/version_4.4.45+67 origin/APP-RETAIL/release/version_4.4.49+701 origin/HEAD -> origin/master origin/SPA-32_utilities origin/SPA-582-temp origin/SPA-75-InputWareHouse origin/THAIHUONG origin/feature/FB_SPA_103_zalo_payment origin/feature/SPA-32-webview origin/feature/SPA-571 origin/feature/THAIHUONG_updateAccount origin/feature/fix_android12_cant_lanch origin/fix-connectivity-plus origin/main origin/master origin/test-window ## Chưa merge vào APP-WINDOW/develop, nhưng loại trừ: APP-FB/release, APP-FB, APP-REPORT, APP-RETAIL, APP-SPA, WINDOW-FB ```bash= git branch -r --no-merged origin/APP-WINDOW/develop | grep -Ev 'origin/(APP-FB/release|APP-FB|APP-REPORT|APP-RETAIL|APP-SPA|WINDOW-FB)' ``` => 14 branches: > origin/APP-WINDOW/release/version_3.16 origin/APP-WINDOW/release/version_3.24 origin/HEAD -> origin/master origin/SPA-582-temp origin/SPA-75-InputWareHouse origin/THAIHUONG origin/feature/FB_SPA_103_zalo_payment origin/feature/SPA-32-webview origin/feature/THAIHUONG_updateAccount origin/feature/fix_android12_cant_lanch origin/fix-connectivity-plus origin/main origin/master origin/test-window ## Chưa merge vào APP-SPA/develop, nhưng loại trừ: APP-FB/release, APP-FB, APP-REPORT, APP-RETAIL, APP-WINDOW, WINDOW-FB ```bash= git branch -r --no-merged origin/APP-SPA/develop | grep -Ev 'origin/(APP-FB/release|APP-FB|APP-REPORT|APP-RETAIL|APP-WINDOW|WINDOW-FB)' ``` => 20 branches: > origin/APP-SPA/feature/SPA-642 origin/APP-SPA/feature/fix_parse_json origin/APP-SPA/feature/fix_search_product origin/APP-SPA/feature/fix_sync_data_branch origin/APP-SPA/feature/update_flutter_2 origin/APP-SPA/release/version_1.6.3+33 origin/HEAD -> origin/master origin/SPA-32_utilities origin/SPA-582-temp origin/SPA-75-InputWareHouse origin/THAIHUONG origin/feature/FB_SPA_103_zalo_payment origin/feature/SPA-32-webview origin/feature/SPA-571 origin/feature/THAIHUONG_updateAccount origin/feature/fix_android12_cant_lanch origin/fix-connectivity-plus origin/main origin/master origin/test-window ## Các nhánh WINDOW-FB ```bash= git branch -r --list "origin/WINDOW-FB*" ``` => 17 branches: > origin/WINDOW-FB/feature/SPA-198 origin/WINDOW-FB/feature/SPA-326 origin/WINDOW-FB/feature/cap_nhat_fb_develop_2605 origin/WINDOW-FB/feature/merge_branch_fb_develop origin/WINDOW-FB/feature/merge_code_10_08 origin/WINDOW-FB/feature/merge_code_11_08 origin/WINDOW-FB/feature/remove_data_app origin/WINDOW-FB/feature/search_unicode origin/WINDOW-FB/feature/test_brancher origin/WINDOW-FB/feature/type_vietnamese origin/WINDOW-FB/feature/update_01_01_22 origin/WINDOW-FB/feature/update_01_04_2022 origin/WINDOW-FB/feature/update_01_10 origin/WINDOW-FB/feature/update_01_11 origin/WINDOW-FB/feature/update_new_year_2022 origin/WINDOW-FB/feature/update_vietnamese origin/WINDOW-FB/master ## Giữ lại tất cả các nhánh trên, còn lại xóa hết ### 1. Lưu danh sách trên vào keep.txt ```text= origin/APP-FB/develop_update origin/APP-FB/feature/162_order_customer_screen origin/APP-FB/feature/FB_178_review_on_store origin/APP-FB/feature/FB_SPA-284_apply_multiple_voucher origin/APP-FB/feature/FB_SPA-288_update_result_of_print_kitchen origin/APP-FB/feature/FB_add_param_sync_order origin/APP-FB/feature/FB_apply_promotion_by_customer ... ``` ### 2. Loại bỏ tiền tố `origin/` ```text= APP-FB/develop_update APP-FB/feature/162_order_customer_screen APP-FB/feature/FB_178_review_on_store APP-FB/feature/FB_SPA-284_apply_multiple_voucher APP-FB/feature/FB_SPA-288_update_result_of_print_kitchen APP-FB/feature/FB_add_param_sync_order APP-FB/feature/FB_apply_promotion_by_customer ... ``` ### 3. Liệt kê tất cả các nhánh ```bash= git branch -r | sed 's/origin\///' > all.txt ``` ### 4. Lọc các nhánh cần xóa ```bash= grep -Fxv -f keep.txt all.txt > delete.txt ``` ### 5. Xóa các nhánh cần xóa (batch 10 item một lần) ```bash= head -n 10 delete.txt | xargs -I {} git push origin --delete {} && sed -i '1,10d' delete.txt ```