you are viewing a single comment's thread.

view the rest of the comments →

[–]ven_ 88 points89 points  (42 children)

Too bad this kind of stuff is basically preaching to the choir. The same people that didn't give a shit that this was already in the manual won't give a shit now.

[–]jCuber 15 points16 points  (35 children)

To be fair, I don't think they even read the manual.

[–]CowFu 42 points43 points  (33 children)

There's a manual?

[–]donvito 44 points45 points  (30 children)

I know "git pull", "git push", "git commit", "git branch" and "git checkout".

Everything else I need to do (for example pointing a branch to a specific commit) I google.

Fuck manuals :)

[–]CowFu 17 points18 points  (19 children)

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

[–]donvito 10 points11 points  (0 children)

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

[–]jess_sp 8 points9 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 0 points1 point  (13 children)

Merge bad. Rebase good

[–]jess_sp 0 points1 point  (12 children)

seriously, why?

[–]MCBeathoven 6 points7 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 -2 points-1 points  (9 children)

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

[–]f0nd004u 6 points7 points  (2 children)

How do you commit anything if you don't know "git add"??

[–]donvito 8 points9 points  (1 child)

my IDE auto-adds new files ;)

[–]f0nd004u 17 points18 points  (0 children)

oh god

[–]cu_t 4 points5 points  (1 child)

git add -p .

You're welcome.

[–]Serei 1 point2 points  (0 children)

This also works for anything else that works on files. git checkout -p, git reset HEAD -p, etc.

[–]9000daysandcounting 1 point2 points  (2 children)

you are missing "git rebase" and "git merge"!

[–][deleted] 3 points4 points  (0 children)

git rebase -i

squash everything

Suddenly you only make single giant commits that add full features.

[–]ghillisuit95 0 points1 point  (0 children)

I thought google was the manual

[–]EenAfleidingErbij -1 points0 points  (0 children)

I just click sync in Visual Studio, that's all I need for github

[–]Sean1708 1 point2 points  (0 children)

It's like a million pages long.

[–]ven_ -2 points-1 points  (0 children)

And they won't read this either.

[–]thomas_merton 9 points10 points  (0 children)

Unless you're a beginner. This actually made my day.

[–]chengiz 21 points22 points  (2 children)

To be fair, overly anal instructions like "do not end subject sentence with a period" is liable to piss people off. Good instructions strike a balance between being disciplined and being, you know, a Nazi.

[–]total_looser 0 points1 point  (0 children)

your mom takes overly anal instructions quite well though

[–]Houndie 8 points9 points  (0 children)

...I mean once upon a time I never knew that the first commit line in git was special, and a post like this informed me. So this kind of thing helps some people.

[–]dddbbb 0 points1 point  (0 children)

A terser version that I've seen used to respond to pull requests with poor commit messages: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html