Useful snippets

    Links

    2023-10-22

    Links

    lazygit issues

    2024-02-20

    • kan ikke alltid pulle eller pushe fra branch window.
    • rename branch usynliggjør tekst mens man beveger markøren bakover, men kommer tilbake igjen når man skriver igjen
    • åpne lazygit stash og så klikke _ (underscore). Så ser man ikke innholdet i den stashen. Man må bevege seg ned og opp igjen først

    compare branch with main

    2025-10-31

    CLI

    git diff main..HEAD # does not include uncommitted changes

    git diff main..$(git branch --show-current) # does not include uncommitted changes

    git show $(git branch --show-current)

    git branch --show-current is current branch

    Lazygit

    1. Highlight main branch
    2. Shift w & hit enter
    3. highlight the branch you want to compare with

    Webstorm

    1. GitToolBox? Should not be necessary I think

    https://useful-snippets.netlify.app/posts/webstorm-compare-with-branch/

    image

    VS Code

    1. Gitlens?

    Neovim

    1. Diffview