Skip to content

Instantly share code, notes, and snippets.

@mdickin
Last active February 27, 2019 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdickin/06adcc77618d8a7ccd378c429f7b4acb to your computer and use it in GitHub Desktop.
Save mdickin/06adcc77618d8a7ccd378c429f7b4acb to your computer and use it in GitHub Desktop.
Helpful aliases in git
//git config --global alias.<alias> <git-command>
//C:\Users\matt.dickinson\.gitconfig
//Remove a remote branch
delr = push -d origin
//Create a new branch
newb = "!git branch $1 && git checkout $1 && git push -u origin $1 #"
//Delete local and remote branch
delb = "!git push -d origin $1 && git branch -d $1 #"
//Refresh "latest" branch from server without having to change working branches
getlatest = fetch origin latest:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment