Skip to content

Commit

Permalink
Switch from 'master' to 'main' default branches
Browse files Browse the repository at this point in the history
  • Loading branch information
joshsh committed Jul 9, 2023
1 parent f45c07b commit 731b896
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In the SmSn VCS model, you define four separate Git repositories, one for each s
* In SmSn, export to VCS (in Emacs brain-mode, use `M-x brain-export-vcs-prompt`).
* Shut down Gremlin Server. (Or leave it running, but don't edit the graph again until you have re-imported it (below). Edits made between now and then will be lost.)
* Get some reports: In a shell, go to the VCS folder, and run "lost-nodes.sh" to see whether any nodes have disappeared. (For each note in SmSn, there exists a corresponding file in the VCS folder.) For more detail, run `bash status.sh` to see what files have been changed, added, deleted.
* If those reports look good, run `bash cycle-master.sh`. That performs each of the following, unless a step fails, in which case the ones after it are not performed either.
* If those reports look good, run `bash cycle-main.sh`. That performs each of the following, unless a step fails, in which case the ones after it are not performed either.
* Commits the latest changes.
* Pulls from the four repositories, adding everyone else's recent changes.
* If there are no conflicts, it pushes to the four repositories. Otherwise the user will have to manually correct them.
Expand All @@ -20,5 +20,5 @@ In the SmSn VCS model, you define four separate Git repositories, one for each s
* In Semantic Synchrony, import from VCS (in Emacs brain-mode, use `M-x brain-import-vcs-prompt`).

### Things to tweak
* The above assumes the working branch for each of the four repositories is called "master". See if-the-4-branch-names-vary/ for what to do if they don't all have the same name.
* In the last step of cycle-master.sh, where it renames the old neo4j folder, you'll have to make sure it renames the right thing. My neo4j folder is called "it" and resides one folder up from these scripts, hence "../it". Where you see "../it" you'll need to substitute a path appropriate to your system.
* The above assumes the working branch for each of the four repositories is called "main". See if-the-4-branch-names-vary/ for what to do if they don't all have the same name.
* In the last step of cycle-main.sh, where it renames the old neo4j folder, you'll have to make sure it renames the right thing. My neo4j folder is called "it" and resides one folder up from these scripts, hence "../it". Where you see "../it" you'll need to substitute a path appropriate to your system.
4 changes: 2 additions & 2 deletions cycle-master.sh → cycle-main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ then
&& printf "\n\nBeginning commit.sh.\n"\
&& bash commit.sh\
&& printf "\n\nBeginning pull*.sh.\n"\
&& bash pull-master.sh\
&& bash pull-main.sh\
&& printf "\n\nBeginning push*.sh.\n"\
&& bash push-master.sh\
&& bash push-main.sh\
&& mv ../it ../it.$(date +"%Y_%m_%d_%I_%M_%p")

bash status.sh
Expand Down
4 changes: 2 additions & 2 deletions pull-master.sh → pull-main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

for dir in `cat list-of-repositories.txt`; do
cd ${dir}
echo "pulling from origin/master in "${dir}
git pull origin master
echo "pulling from origin/main in "${dir}
git pull origin main
cd -
done
4 changes: 2 additions & 2 deletions push-master.sh → push-main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

for dir in `cat list-of-repositories.txt`; do
cd ${dir}
echo "pushing to master in "${dir}
git push origin master
echo "pushing to main in "${dir}
git push origin main
cd -
done

0 comments on commit 731b896

Please sign in to comment.