Loose development notes for blueCFD Core's way of doing things - blueCFD/Core GitHub Wiki
This wiki page is a temporary catch-all page where we place the commands we have been using in certain development conditions.
Finding duplicate entries in the Make/options files
foam
find src applications -name options | while read line
do
echo $line
grep "\-l.*" $line | sed -e 's= *\\$==g' -e 's= *\(-\)=-=' | sort | uniq -d
echo
done | less
Cherry pick changes from one branch to the main development branch
Example for OpenFOAM-5.x:
git checkout blueCFD-Core-5.x
commits=$(git log --author="Bruno Santos" --oneline --reverse d3872b3~1.. | grep -v "Merge branch 'OpenFOAM-5.x'" | sed -e 's= .*==')
git checkout blueCFD-Core-dev
git checkout -b tmp
for commit in $commits
do
echo "============== Performing $commit ============"
git cherry-pick $commit || break
done
After it's completed with success:
git checkout blueCFD-Core-dev
git merge tmp
git branch -d tmp