3 Commits

Author SHA1 Message Date
Ivan Malopinsky d33bde493a bump to 1.6.2 2016-03-30 12:23:19 -04:00
Ivan Malopinsky 9a061ce30b reset/rebase against remote branches 2016-03-29 11:05:34 -04:00
Ivan Malopinsky 236f95ea18 merge/rebase against local root
fix #68
2016-03-28 17:34:47 -04:00
2 changed files with 6 additions and 7 deletions
+5 -6
View File
@@ -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
View File
@@ -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",