• 1 Post
  • 54 Comments
Joined 1 year ago
cake
Cake day: June 19th, 2023

help-circle















  • My take is use a GUI for anything read-only/nondestructive (i.e. anything that won’t modify your local or remote state). It’s nice for example to compare the state of two branches.

    For anything that does changes make sure you know what’s happening under the hood, otherwise you might shoot yourself in the foot. It’s convenient for example to do a commit and push in one go, but then you lose the ability to edit any changes (you’re forced to either do another commit, or change your local commit and force push).

    In VSCode you can go to the Output pane and switch to Git - there you’ll see everything that gets done through Git’s CLI for whatever you do through the GUI (although it can be a bit noisy); same goes other GUI utils.


  • One key thing that can help you wrap your head around rebasing is that branches get switched while you’re doing it; so, say you’re on branch feature and do git rebase master, for any merge conflict, whatever’s marked “current” will be on master and what’s “incoming” is from feature.

    There’s also git rerere that should in theory remember a resolution you do between two branches and reuse it every time after the first; I’ve rarely used it in practice; it would happen for long lived branches that don’t get merged.