Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d33bde493a | |||
| 9a061ce30b | |||
| 236f95ea18 |
@@ -131,7 +131,6 @@ if [[ $REMOTES = true ]]; then
|
||||
git remote update
|
||||
git remote prune $REMOTE
|
||||
|
||||
|
||||
# If the current branch exists on the remote, rebase against it
|
||||
|
||||
REMOTE_CURRENT=$(git ls-remote $REMOTE --heads 2> /dev/null | grep "heads/$CURRENT$" | cat)
|
||||
@@ -150,9 +149,9 @@ if [[ $REMOTES = true ]]; then
|
||||
|
||||
if [[ "$FORCE_LOCAL_RESET" = true ]]; then
|
||||
git clean -dfx
|
||||
git reset --hard $REMOTE $ROOT
|
||||
git reset --hard $REMOTE/$ROOT
|
||||
else
|
||||
git rebase -q $REMOTE $ROOT
|
||||
git rebase -q $REMOTE/$ROOT
|
||||
fi
|
||||
|
||||
fi
|
||||
@@ -196,18 +195,18 @@ fi
|
||||
# Rebase or merge remote root against local branch
|
||||
|
||||
if [[ ! -z $(git rev-parse --verify --quiet "$CURRENT") ]]; then
|
||||
git checkout $CURRENT 2> /dev/null
|
||||
git checkout $CURRENT
|
||||
|
||||
if [ "$REBASE" = true ] && [ "$MERGE" = true ]; then
|
||||
say "Rebase and merge enabled, skipping both"
|
||||
else
|
||||
if [[ "$REMOTES" = true ]]; then
|
||||
if [[ "$REBASE" = true ]]; then
|
||||
git rebase $REMOTE $ROOT
|
||||
git rebase $ROOT
|
||||
fi
|
||||
|
||||
if [[ "$MERGE" = true ]]; then
|
||||
git merge --no-edit $REMOTE $ROOT
|
||||
git merge --no-edit $ROOT
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "git-fresh",
|
||||
"version": "1.6.1",
|
||||
"version": "1.6.2",
|
||||
"description": "Utility to keep Git repositories fresh",
|
||||
"global": true,
|
||||
"repo": "imsky/git-fresh",
|
||||
|
||||
Reference in New Issue
Block a user