Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleLayering UQAM updates over VIVO core


Code Block
languagebash
# Locally clone UQAM project (note: UQAM projects only include files that were changed)
git clone https://github.com/UQAM-VIVO/VIVO.git VIVO-uqam
cd VIVO-uqam/

# Create working branch
git checkout -b prep

# Reorganize code to align with core project structure
mkdir api
mv src/ api/
git add .
git commit

# Create a list of all that were changed/added by UQAM
find . -type f|grep -v .git > files.txt

# Pull down a copy of core project into a local branch
git remote add upstream https://github.com/vivo-project/VIVO.git
git fetch upstream
git checkout -b upstream-master --track upstream/master

# Magic: bring files from the 'prep' branch into the 'upstream-master' branch
cat files.txt | xargs git checkout prep

# Clean-up
rm files.txt*
git add .
git commit

# Push to UQAM GitHub
git push origin



Expand
titleLayer Layering UQAM updates onto fork of core


Code Block
languagebash
# Locally clone VIVO fork
git clone https://github.com/UQAM-VIVO-2/VIVO.git VIVO-uqam-2
cd VIVO-uqam-2/

# Create working branch
git checkout -b prep

# Pull down a copy of UQAM updates into a local branch
git remote add upstream https://github.com/UQAM-VIVO/VIVO.git
git fetch upstream

# Magic: layer UQAM updates over fork of core project
git cherry-pick `git log upstream/upstream-master -n 1 --pretty=%H`

# Push to UQAM-2 GitHub
git push origin prep

# In GitHub, make pull-request to core project


...