metno / emep-ctm

Open Source EMEP/MSC-W model
GNU General Public License v3.0
27 stars 18 forks source link

Subtree for source code #2

Closed avaldebe closed 7 years ago

avaldebe commented 7 years ago
avaldebe commented 7 years ago

git-subtree as separate branch from here

# new orphan branch (no commit history) named source
git checkout --orphan source

# Unstage all files
git rm --cached $(git ls-files)

# need a file to commit, get the license file from rv3
# get source code for version rv3 from ftp server
tools/catalog.py --tmppath=/tmp -R rv3 -s --yes

# keep the license and remove all else
mv Unify/Unimod.rv3/gpl.txt .
rm -fr Unify/

# Add and commit that file
git add gpl.txt
git commit -m "INIT: initial commit on source branch"

# Push to remote source branch
git push origin source

# Return to master branch
git checkout master

# Add the source branch of the repository. It will look like a folder named source
git subtree add --prefix=source origin source --squash

# Pull the file we just committed. This helps avoid merge conflicts
git subtree pull --prefix=source origin source
avaldebe commented 7 years ago

Import rv3 source code from ftp server

# get source code for version rv3 from ftp server
tools/catalog.py --tmppath=/tmp -R rv3 -s --yes

# move the files to the source folder and cleanup
mv Unify/Unimod.rv3/* source/
rm -fr Unify/

# Add everything
git add -A

# Commit and push to master
git commit -m "import rv3 source code from ftp site"
git push origin master

# Push the source subtree to the source branch
git subtree push --prefix=source origin source
avaldebe commented 7 years ago

tag rv3 source

# Back to source branch and update changes
git checkout source
git pull origin source

# Create tag and push to origin
git tag rv3 -m "OpenSource rv3 (200802)"
git push --tags