Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tags vs branches in git [closed]

We have a large rails project that runs on a production and staging server. Is it a good idea to create tags everytime we deploy to staging or production (this would happen automatically with capistrano). Or is better to create branches named "devlopment" and "staging", (master would contain the production status)?

like image 551
antpaw Avatar asked Aug 04 '12 09:08

antpaw


1 Answers

Tags in git are pretty long-lived: they automatically propagate when you fetch from a remote repository, and if you want to clean them up you have to do so manually in every copy. Therefore, I'd rather use branches (and possibly their reflogs) for marking automatic deployment, because otherwise I'd probably be buried in lots of tags very soon.

like image 66
che Avatar answered Oct 04 '22 13:10

che