Skip to content
Lionel Siess edited this page Jan 3, 2022 · 22 revisions

Phantom Wind

Basic git instructions

local commit 

 git status
 git diff src/main/eos.F90
 git add filename
 git commit -m "these are all the changes I made made"
 git push

getting a specific revision
 git checkout 536aa21 -b Krome

undo last commit while keeping the changes
 git reset --soft HEAD~1

reset all local changes (commit not done yet)
 git reset --hard

getting updates:
 git stash
 git pull
 git stash pop

branches
 git branch -a  --> list available branches
 git branch -r  --> list remote branches
 git checkout -b mybranch --> create new branch
 git push origin mybranch --> push new branch on github


set OMP THREAD number
  export OMP_NUM_THREADS=1

Merge official PHANTOM branch with local master

 git checkout master
 git pull
 git fetch upstream
 git merge upstream/master

Merge local master into wind branch

 git checkout master
 git pull
 git checkout wind
 git merge master

Ignore devel directory when merging wind with master

Working solution : prevent the automatic commit of the merge, remove devel and commit without devel
 git checkout master
 git merge --no-commit --no-ff wind
 git reset -- devel
 rm -Rf devel
 git commit


The solution with .gitattribues does not work for me ?
 git config --global merge.ours.driver true
 git checkout master
 echo "devel merge=ours" >> .gitattributes
 git merge --no-commit --no-ff wind
Clone this wiki locally