Settings

Theme

A Basic Git Workflow for Smaller Projects

medium.com

4 points by peterjussi 6 years ago · 2 comments

Reader

chmaynard 6 years ago

I like this workflow. When I'm ready to merge a feature branch into master, I generally do it this way to simplify the history on master:

  git switch master
  git merge --squash feature
  git commit -m <feature description>
  • peterjussiOP 6 years ago

    Right, the main difference there would be that the changes get combined into one squash commit rather than a merge commit. Mostly an aesthetic choice, so I could definitely see both as viable.

    If I wanted to move changes between branches I would probably prefer a squash rather than a regular merge, as that will look cleaner in the history.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection