Git Without Stash/Tags

5 pointsposted 5 months ago
by birb07

Item id: 45242216

6 Comments

aosaigh

5 months ago

I use stashes like I would use a shelf above a workbench - to put things for a few minutes while I clean up. I think it's a nice feature.

giveita

5 months ago

It is like a faucet and a cistern. Same plumbing, different porcelain.

_c7zm

5 months ago

Tags in Git are useful when you need to make a release, upload files to that release, and provide a download link for the file. That’s when I personally use tags.

scrapheap

5 months ago

Tags and Stashes are both commonly used features of Git. There's a lot of value of having well defined ways of handling them, especially when it comes to collaborating with others on developing code.

With the way Stashes are implemented, you don't have to worry about someone accidentally pushing a branch up that was really just some changes they wanted to store temporarily without messing up the repository's history.

With the way Tags are implemented, you don't have to have an agreement with all your colleagues about how a branch should be named to represent a tag. You also don't have to worry about how you have named the branch you're working on that will add support to your current project for it's own concept of tagging.

skydhash

5 months ago

Tags: Important commits. Branches are working spaces, so having a bunch of them can clutter up completion when switching and stuff.

Stash: A nicer way to store diffs than the filesystem. I could create a new branch, but the same clutter would happen. The stash is also a temporary space. Anything older than a few days is probably irrelevant.

abstractspoon

5 months ago

I use stashes all the time, often when I want to explore two different solutions to a problem.

I also use them when I've lost track of the original code and stashing lets me switch back and forth with ease.

I don't use tags.