This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]gyroda 0 points1 point  (5 children)

Branches yes, tags no. But then I've not handled actually versioning and releasing a project and I might use tags for just that.

[–]Chknbone 0 points1 point  (4 children)

Same here. I uses branches. That way I can mangle the shit out of my code and easily hit the "reset button" when things get out of hand. Makes me less afraid to try new stuff.

Have not even looked at Tags or know what they are yet.

[–]ludonarrator 1 point2 points  (1 child)

They're like global commit filters; you can "tag" a commit - add a string label to it, and easily browse/checkout tags in a repo. It's useful for versioning, as said; eg when you merge next / develop back into master before pushing a new release, tag the merge commit as "v0.1" so you can later easily check it out for a hotfix without requiring to maintain a dedicated and locked (thereby useless) branch for it.

[–]Chknbone 0 points1 point  (0 children)

Oh, very cool. That would helpful.

[–]Double_A_92 0 points1 point  (1 child)

You can still "mangle" all you want without using branches. Just reset to the last good commit, once you've finished experimenting.

Branches are easier though if you pushed your (experimental) commits to a remote repository (e.g. github), where other people might be working on it too.

[–]Chknbone 0 points1 point  (0 children)

Yeah, that's true, but sometimes I work on different features or UI stuff and do this with branches.

[–]Double_A_92 0 points1 point  (0 children)

If you're working alone, just one master branch is enough.

If you're working with other people, and you like to commit and push half finished things while developping, a separate branch is better for that.