←back to thread

3 points birb07 | 1 comments | | HN request time: 0.205s | source

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? :)

1. scrapheap ◴[] No.45247937[source]
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.