A summary of the patterns and best practices I use in git commit messages.
The commits analyzed generally follow the well-established conventions documented in:
aspe:keyoxide.org:Q24ZRMWF2VFSRKFSDLTOXCG43Q
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
| <opml version="2.0"> | |
| <body> | |
| <outline text="Foo"> | |
| <outline text="Bar" _note="Baz"/> | |
| </outline> | |
| </body> | |
| </opml> |
| // Inspired by https://attacomsian.com/blog/deep-anchor-links-javascript | |
| // How to use: Create a new browser bookmark with the code below as the URL. | |
| // See https://www.freecodecamp.org/news/what-are-bookmarklets/ | |
| // for more background and detailed instructions. | |
| javascript:document.querySelectorAll('h2[id], h3[id], h4[id], h5[id], h6[id]').forEach(heading => { | |
| let anchor = document.createElement('a'); | |
| anchor.href = '#' + heading.getAttribute('id'); | |
| anchor.innerText = '#'; | |
| anchor.style = 'margin-left: 0.3em'; | |
| heading.appendChild(anchor); |
Reapply commits from one branch on top of another branch. Commonly used to "move" an entire branch to another base, creating copies of the commits in the new location. More information: https://git-scm.com/docs/git-rebase.
# Rebase the current branch on top of another specified branch:
git rebase {{new_base_branch}}| # To use with the [vscode-restclient](https://github.com/Huachao/vscode-restclient) extension | |
| #------------------------------------------------------------------------------- | |
| # Example with JSON data | |
| POST https://api.example.com/address | |
| Content-Type: application/json | |
| { | |
| "foo": "bar", | |
| "baz": "qux" |