{"thread":{"id":"54730","subject":"git-smartlist 1.0 released","startedAt":"2020-11-30T08:47:37Z","lastAt":"2020-11-30T08:47:37Z","messageCount":1,"participants":["Felipe Contreras"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"410990","messageId":"CAMP44s08MH36SYqG1QE8tf5VdxJ-Cb8kpwD3eHeBQH+WSyBnLw@mail.gmail.com","threadId":"54730","inReplyTo":null,"subject":"git-smartlist 1.0 released","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2020-11-30T08:46:27Z","receivedAt":"2020-11-30T08:47:37Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Hello,\n\nFor a while I've been using some shortcuts to visualize my specific\nchanges in comparison to some upstream/official/master changes.\n\nFor example, if I just do \"gitk @\" it takes a while to load the 61K\ncommits that are part of the \"current branch\", when in fact I'm\ninterested in only 10 or so.\n\nI can simply do \"gitk master..@\", and that does the trick, but it gets\nto be a bit tedious to type that every single time.\n\nMoreover, maybe I'm interested in two branches: \"fc/feature-a\", and\n\"fc/feature-b\". I can find the specific commits with \"fc/feature-a\nfc/feature-b ^master\".\n\nBut what if they are not based on \"master\", but \"next\". Or worse; what\nif one is based on \"next\", and the other on \"stable\"?\n\nEasy, you just do \"fc/feature-a fc/feature-b --not $(git merge-base\nfc/feature-a fc/feature-b)\".\n\nAt this point it should be clear that perhaps a helper would help.\n\nThis is the primary problem git-smartlist is trying to solve.\n\nIn its essence git-smartlist tries to generate the revision list you\nmost likely want.\n\nThe whole point is to avoid typing as much as possible, and generate\nminimal, yet useful, revlist.\n\nIn its main mode without any arguments git-smartlist simply generates\n\"@{upstream}..@\". If you specify a branch, it will generate\n\"branch@{upstream}..branch\". In both cases if no upstream branch is\nconfigured, \"master\" will be used.\n\nThen, if more than two branches are specified (e.g. fc/feature-a,\nfc/feature-b), git-smartlist will find the merge base of both and do\n\"fc/feature-a fc/feature-b --not $merge_base\".\n\nTo configure an alias for this mode:\n\n  ls = smartlist log specific\n\nThen, typing \"git ls\" will trigger this mode, and you can do \"git ls\",\n\"git ls fc/feature-a\", or \"git ls fc/feature-a fc/feature-b\".\n\nYou can replace \"log\" with your favorite command. In my case it's `lg`\n(log --oneline --decorate --boundary --graph).\n\nA second very useful mode is \"branches\". If you specify more than one\nbranch it's the same as the \"specific\" mode, however, if you don't\nspecify any argument it will be the same as \"--branches --not\n$merge_base\", and if you specify a namespace like \"fc/\" it will be\n\"--branches=fc/ --not $merge_base\", or you can specify a prefix as\nwell \"fc-*\" -> \"--branches=fc-* --not $merge_base\".\n\nI use this a lot when I want to see a bunch of branches with a certain\nprefix, for example: \"git lb fc/completion/\".\n\nIf on the other hand you use gitk a lot--like me--you might want to\nconsider this alias:\n\n  v = \"!f() { gitk \\\"$@\\\" & }; f\n\nThen you can have shortcuts for both text (lg) and visual (gitk)\nexploration of the commits.\n\n  ls = smartlist lg specific\n  lb = smartlist lg branches\n  vs = smartlist v specific\n  vb = smartlist v branches\n\nFor more information check the repository in GitHub.\n\nhttps://github.com/felipec/git-smartlist\n\nCheers.\n\n--\nFelipe Contreras\n"}]}