Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Fun with Git

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

Fun with Git

Some more advanced uses of git and links to the docs. Github repo also has examples of a good git-hook

Avatar for Andrew Strovers

Andrew Strovers

July 19, 2016
Tweet

Other Decks in Technology

Transcript

  1. Fun with Git Diff Piping the output to a different

    program (Ex: git `diff | mate`) Diffing between branches (Ex: `git diff master..HEAD`) Diffing for a single file (Ex: `git diff -- path/to/file`) git diff documentation
  2. Fun with Git Stash Stashing changes when you are asked

    to make a Hotfix (Ex: `git stash`) Adding a description to your stash (Ex: `git stash save “message here”`) Viewing a list of your stashed items (Ex: `git stash list`) Popping stashed items from the list (Ex: `git stash pop stash@{#}` *Destructive*) Applying stashed items from the list (Ex: `git stash apply stash@{#}`) git stash documentation
  3. Fun with Git Hooks Run linter on code before you

    commit it to the repository Push a slack notification whenever you update the remote repository Create a personal log of commits for your own sake Automatically run test suite before committing to the repository git hook documentation
  4. Tools to Make Your (git) Life Easier! Git-up: (https://github.com/aanand/git-up) Not

    maintained anymore but it still works currently. Git-flow: (https://github.com/nvie/gitflow) Git-plus: (https://github.com/tkrajina/git-plus)