Git

nicolaw 22nd August 2018 at 11:10am
TechnicalNotes
# for the naughty and lazy people
git commit --amend -C HEAD
function again () {
  if git rev-parse --abbrev-ref HEAD \
    | egrep -q '^(master|HEAD)$' ; then
    >&2 echo "Refusing to do the dirty!"
    return 1
  else
    git commit --amend --no-edit --all \
      && git push --force-with-lease origin
  fi
}
st = status --short --branch
last = log -1 HEAD
unstage = reset HEAD --
please = push --force-with-lease origin
[includeIf "gitdir:~/Coding/"]
  path = ~/Coding/.gitconfig
[includeIf "gitdir:~/develop/"]
  path = ~/develop/.gitconfig
[push]
  default = current
[credential]
  helper = cache

https://developer.atlassian.com/blog/2015/04/force-with-lease/force-with-lease.jpg


Related