Snippets about git

11 snippets

Back to all snippets

  1. SNP128

    Find the commit that broke things with git bisect

    Binary search through history, so 200 commits take 8 steps.

    7 lines of sh in 4 blocks, 7 lines of explanation.

    #294 git
  2. SNP091

    LLM prompt for writing commit messages

    Paste a diff, get a commit message that follows the conventions and says why, not just what.

    12 lines of md in 1 block, 3 lines of explanation.

    #35B llm prompt git
  3. SNP087

    Delete all branches that are already merged

    Thirty old feature branches in git branch? Clean house in one line.

    1 line of sh in 1 block, 6 lines of explanation.

    #694 git
  4. SNP064

    Stop tracking a file without deleting it

    You committed .env or a build folder. Get it out of git but keep it on disk.

    4 lines of sh in 2 blocks, 5 lines of explanation.

    #A42 git
  5. SNP059

    Sign your commits with your SSH key

    Verified badges on GitHub without setting up GPG.

    6 lines of sh in 2 blocks, 4 lines of explanation.

    #64B git ssh
  6. SNP054

    Different git identity for work and personal projects

    Stop committing to work repos with your personal email, automatically.

    9 lines of ini in 2 blocks, 6 lines of explanation.

    #1B3 git
  7. SNP049

    Named stashes

    stash@{3} means nothing to anyone. Give your stashes names.

    4 lines of sh in 3 blocks, 5 lines of explanation.

    #624 git
  8. SNP030

    Delete a branch locally and on the remote

    The feature is merged, the branch can go.

    3 lines of sh in 3 blocks, 4 lines of explanation.

    #13A git
  9. SNP027

    Change the last commit message

    Fix a typo in the commit message you just wrote.

    1 line of sh in 1 block, 6 lines of explanation.

    #4B7 git
  10. SNP020

    Undo the last commit but keep the changes

    Committed too early? Take the commit back without losing any work.

    2 lines of sh in 2 blocks, 8 lines of explanation.

    #614 git
  11. SNP016

    Solve Bitbucket SSH-RSA connection issue

    How to solve permission denied or no mutual signature algorithm errors while connecting to Bitbucket.

    3 lines of sh in 3 blocks, 11 lines of explanation with 4 notes.