File: git-back

package info (click to toggle)
git-extras 1.7.0-1.2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 696 kB
  • sloc: sh: 381; makefile: 52
file content (11 lines) | stat: -rwxr-xr-x 190 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

if test $# -eq 0; then
  git reset --soft HEAD~1
else
  if `echo $1 | grep -q [^[:digit:]]`; then
    echo "$1 is not a number" 1>&2
  else
    git reset --soft HEAD~$1
  fi
fi