Skip to content

Instantly share code, notes, and snippets.

@awatson1978
Last active June 2, 2017 21:53
Show Gist options
  • Save awatson1978/487b121bb6375631bd93feaf4e889537 to your computer and use it in GitHub Desktop.
Save awatson1978/487b121bb6375631bd93feaf4e889537 to your computer and use it in GitHub Desktop.
Git - Pruning, Grafting, Splicing, Graphing

Pruning, Grafting, Splicing

A team member (or self) has checked in a few bad commits into GitHub and broken the build. Here's how to move their commits into a new branch, and bring master back to green.

git pull origin development
git checkout -b prune
git push origin prune

git checkout development
git reset --hard 2c9ab34fe1bee4c0c124ab6da35e47c7ee020619 
git push origin --force development

Graphing

http://stackoverflow.com/questions/1057564/pretty-git-branch-graphs
http://bit-booster.com/graph.html
http://gitgraphjs.com/
http://gitgraphjs.com/examples/gitflowsupport.html
https://github.com/nicoespeon/gitgraph.js/tree/master/examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment