bimagic 1.4.5 → 1.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/bimagic +28 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -454,6 +454,12 @@ The `Remove files/folders (rm)` option lets you select files and folders interac
|
|
|
454
454
|
|
|
455
455
|
Usage from CLI: `bimagic -a` or `bimagic --architect`
|
|
456
456
|
|
|
457
|
+
### Pull latest changes (Option 6)
|
|
458
|
+
|
|
459
|
+
Fetch all updates from remotes and pull the latest changes from all branches.
|
|
460
|
+
|
|
461
|
+
Usage from CLI: `bimagic -p`
|
|
462
|
+
|
|
457
463
|
### Merge branches (Option 14)
|
|
458
464
|
|
|
459
465
|
Merge another branch into your current branch using an interactive selector. If conflicts occur, you will be notified to resolve them manually.
|
package/bimagic
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
|
|
3
|
-
VERSION="v1.4.
|
|
3
|
+
VERSION="v1.4.6"
|
|
4
4
|
|
|
5
5
|
if [[ "$1" == "--version" || "$1" == "-v" ]]; then
|
|
6
6
|
echo "Bimagic Git Wizard $VERSION"
|
|
@@ -713,6 +713,10 @@ while [[ $# -gt 0 ]]; do
|
|
|
713
713
|
CLI_MODE="graph"
|
|
714
714
|
shift
|
|
715
715
|
;;
|
|
716
|
+
-p)
|
|
717
|
+
CLI_MODE="pull"
|
|
718
|
+
shift
|
|
719
|
+
;;
|
|
716
720
|
-a | --architect)
|
|
717
721
|
CLI_MODE="architect"
|
|
718
722
|
shift
|
|
@@ -746,6 +750,29 @@ if [[ "$CLI_MODE" == "status" ]]; then
|
|
|
746
750
|
exit 0
|
|
747
751
|
fi
|
|
748
752
|
|
|
753
|
+
if [[ "$CLI_MODE" == "pull" ]]; then
|
|
754
|
+
if ! git rev-parse --git-dir >/dev/null 2>&1; then
|
|
755
|
+
print_error "Not a git repository!"
|
|
756
|
+
exit 1
|
|
757
|
+
fi
|
|
758
|
+
|
|
759
|
+
# 1. Fetch
|
|
760
|
+
if gum spin --title "Fetching updates..." -- git fetch --all; then
|
|
761
|
+
print_status "Fetch complete."
|
|
762
|
+
else
|
|
763
|
+
print_warning "Fetch encountered issues during fetch."
|
|
764
|
+
fi
|
|
765
|
+
|
|
766
|
+
# 2. Pull
|
|
767
|
+
if gum spin --title "Pulling all..." -- git pull --all; then
|
|
768
|
+
print_status "Pull all complete."
|
|
769
|
+
else
|
|
770
|
+
print_error "Pull failed. There might be conflicts or no upstream set."
|
|
771
|
+
exit 1
|
|
772
|
+
fi
|
|
773
|
+
exit 0
|
|
774
|
+
fi
|
|
775
|
+
|
|
749
776
|
if [[ "$CLI_MODE" == "graph" ]]; then
|
|
750
777
|
if ! git rev-parse --git-dir >/dev/null 2>&1; then
|
|
751
778
|
print_error "Not a git repository!"
|