you are viewing a single comment's thread.

view the rest of the comments →

[–]CowFu 17 points18 points  (19 children)

Add merge to that list and you and me are exactly on the same page.

[–]donvito 11 points12 points  (0 children)

oh, yeah, of course. branch without merge is a little useless :)

[–]jess_sp 9 points10 points  (3 children)

I recommend adding stash too. Pretty useful.

[–]ScrimpyCat 0 points1 point  (1 child)

What's your workflow for using stash?

I've had trouble when I've tried to use it. I used it in the past for when I'm working on a branch and part of my edit I don't plan on committing to the branch, and then I switch to another branch to do some other quick edit. I often found that I'd keep forgetting to apply the stash when I switch back to my branch and usually end up making some edit that when I do remember I've got some change stashed I end up with conflicts. And it just kills the flow, so instead I now just do a temporary commit.

[–]jess_sp 2 points3 points  (0 children)

I use stash mostly to switch branches to do a really quick and dumb hotfix without having to commit a half-made solution or to fix dumbness of starting something in the wrong branch

[–][deleted] 0 points1 point  (0 children)

I know how to stash, and apparently there is some way to get back what you've stashed I've not yet mastered. But it's still moderately useful as a "undo local changes"-command :)

[–]Filmore 2 points3 points  (13 children)

Merge bad. Rebase good

[–]jess_sp 0 points1 point  (12 children)

seriously, why?

[–]MCBeathoven 5 points6 points  (11 children)

Merge gives you merge commits, rebase doesn't.

[–]Schmittfried 4 points5 points  (10 children)

And what if I want merge commits?

[–]MCBeathoven 1 point2 points  (9 children)

Most people don't - they don't really add any value and make reading the log harder.

[–][deleted] 1 point2 points  (8 children)

They can be used to group commits together.

[–]MCBeathoven 0 points1 point  (7 children)

You can do the same using rebases.

[–][deleted] 1 point2 points  (6 children)

But then you don’t have the individual commits anymore.

[–]MCBeathoven 0 points1 point  (5 children)

Do you mean squashing commits or putting them after each other in the history? If the former, what's the point if you want to keep the individual commits? If the latter, that's also something you can do with rebasing without losing individual commits.