Skip to content

Instantly share code, notes, and snippets.

View skobes-chromium's full-sized avatar

Steve Kobes (Chromium) skobes-chromium

View GitHub Profile
#!/bin/bash
git add -A .
git commit --amend --no-edit
#!/bin/bash
# Sqash all commits in upstream..HEAD to a single commit.
ONTO=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null)
if [ -n "$ONTO" ]; then
BEHIND=$(git rev-list --left-right --count $ONTO...@ | cut -f1)
if [ $BEHIND != "0" ]; then
echo "$ONTO: behind $BEHIND"
ONTO=