Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Version control for shell scripts

We have a (TAP) environment with a lot of shell scripts running on Solaris. At this moment, only the Production and Acceptance environment are really used because it's too complicated to keep track of all the changes we do.

Therefore I was thinking about introducing version control, but I don't really have an idea of how to implement this.

I was initially thinking about using SVN with Trac and to create a single repository for the whole environment. Use trunk for the Production environment, and creating branches for the Test and Acceptance environment.

We'd develop in the Test branch, test it in the Acceptance branch and eventually merge it with Trunk for Production.

After doing some research, I've found that Git might be better suited in combination with Redmine. And I don't know about the branching/merging approach...

Does anyone mind sharing their ideas with me? I'd really like to have some input and tips on how to approach this.

Thanks

like image 298
Subbeh Avatar asked Oct 06 '22 23:10

Subbeh


1 Answers

Yes, use version control. But rather than ask such an open-ended question on SO, try using google.

SVN is a good choice, and many say it is conceptually simpler than git, so go with that at least at first. Once you've got the idea of storing data in a central repository you can then understand the next steps. Start with simply storing your scripts in the repository to keep a historical backup, once you've got the hang of that, then you can consider developing scripts on 1 machine and using the SCM to checkout on the servers. Branching and merging can come later once you're happy with the basic workflow.

You can use Trac or Redmine with SVN, both are really good bugtracking, project management tools. Just use whichever you prefer the look of.

The SVN redbook is the place to start, it talks you through the beginners usage.

like image 97
gbjbaanb Avatar answered Oct 19 '22 08:10

gbjbaanb