99% of the Git commands you'll need at work, demonstrated in a single script
Maybe my workflow is a lot easier than others, but I work on a team of 10+ engineers and my Git usage is dead simple. I do everything from a GUI (Fork for macOS) and very rarely have to deal with any complicated issues that require a terminal.<p>- Always pull w/ rebase for the current branch.<p>- Always merge other branches into your current branch, eg master -> feature.<p>- Always stage individual chunks of code one at a time to make sure I'm committing the right stuff.<p>- Always squash feature branches into a single commit when merging back.<p>- Stash changes if needed when switching branches.<p>- Cherry-pick one-off commits if needed.<p>- Append a previous commit that I haven't pushed yet if I happened to forget something.<p>- For complicated merge conflicts I switch to Visual Studio Code which also has a great GUI.<p>I think this covers 99% of the stuff I encounter in my day-to-day.