Git Without Stash/Tags

3 points by birb07 a day ago

Wouldn't git be simpler without stashes and tags?

Tags can be deleted and recreated, so they are just like branches and not immutable as some claim.

Same goes for stashes. They are commits which can't be pushed. Stashes could be implemented by creating a new branch and committing both with a generated name.

Am I missing something? Do both things provide more value than they add complexity/things to learn? :)

aosaigh 14 hours 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 13 hours ago

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

scrapheap 14 hours 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.

sl8s a day 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.

abstractspoon 13 hours 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.