pcdshub / engineering_tools

A repository of scripts, configuration useful for the PCDS team
Other
4 stars 27 forks source link

Bare repo script #146

Closed wnwright closed 1 year ago

wnwright commented 1 year ago

There are a lot of IOCs that are not properly version controlled since we moved from svn to git. Often, I run into IOCs that do not have a hutch specific bare repo setup, so I made this script to help facilitate the process of creating that bare repo and the subsequent steps afterwards.

This script:

  1. Initializes the local repository
  2. Checks in the .cfg file, Makefile and .gitignore
  3. Creates the bare repo in the proper location using eco_tools git-bare-repo script
  4. Sets this newly created bare repo as the remote origin and sets it as the upstream

Motivation and Context

As mentioned above

How Has This Been Tested?

This has been tested once with the Smarpod IOC, which I had yet to create a hutch bare repo for. Worked perfectly.

Where Has This Been Documented?

Code includes simple explanations for how to use the script.

If this script is redundant, or could be useful in another script or repository, feel free to shoot this down.

ZLLentz commented 1 year ago

@klauer anything else to change here before merging?

wnwright commented 1 year ago

Thanks @ZLLentz and @klauer !