https://atlassoftwaredocs.web.cern.ch/gittutorial/ https://gitlab.cern.ch/atlas/athena/tree/master http://atlas-nightlies-browser.cern.ch/~platinum/nightlies/globalpage Git nightlies are on CVMFS: /cvmfs/atlas-nightlies.cern.ch/repo/sw/master asetup command asetup Athena master r2017-04-02 here asetup Athena master 2017-04-02T2225 here My own †アトラスの日本人による説明 †Commands †setupATLAS lsetup git mkdir ~/athena cd ~/athena git clone https://:@gitlab.cern.ch:8443/oda/athena.git cd athena git remote add upstream https://:@gitlab.cern.ch:8443/atlas/athena.git git fetch upstream git fetch origin git checkout -b master-test-v1 upstream/master --no-track mkdir ../build cd ../build asetup Athena master r2017-04-02 cp ../athena/Projects/WorkDir/package_filters_example.txt ../package_filters.txt # EDITOR ../package_filters.txt # default is only Control/AthenaExamples/AthExHelloWorld cmake -DATLAS_PACKAGE_FILTER_FILE=../package_filters.txt ../athena/Projects/WorkDir make -j mkdir ../run cd ../run source ../build/x86_64-slc6-gcc62-opt/setup.sh Reco_tf.py --AMI q431 cd ../athena git status git diff setupATLAS lsetup git cd ~/athena/athena git fetch upstream git checkout -b 21.0-SCTDynamicChip-v1 upstream/21.0 --no-track cd .. rm -rf build/ run/ mkdir build mkdir run cd build asetup Athena 21.0 r2017-04-04 cp ../athena/Projects/WorkDir/package_filters_example.txt ../package_filters.txt emacs -nw ../package_filters.txt # Added # + InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv # + InnerDetector/InDetConditions/SCT_ConditionsTools cmake -DATLAS_PACKAGE_FILTER_FILE=../package_filters.txt ../athena/Projects/WorkDir make -j cd ../run source ../build/x86_64-slc6-gcc62-opt/setup.sh Reco_tf.py --AMI f806 --inputBSFile /afs/cern.ch/work/o/oda/public/SCT/Run319214/data17_cos/data17_cos.00319214.express_express.merge.RAW._lb0157._SFO-ALL._0001.1 --outputDAOD_SCTVALIDFile DAOD_SCTVALID.pool.root cd .. cd athena/ # Modify InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ByteStreamErrorsSvc.h # Modify InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ByteStreamErrorsSvc.h # Modify InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ByteStreamErrorsSvc.cxx # Modify InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx cd ~/athena/athena cd ../build make -j cd ../run source ../build/x86_64-slc6-gcc62-opt/setup.sh Reco_tf.py --AMI f806 --inputBSFile /afs/cern.ch/work/o/oda/public/SCT/Run319214/data17_cos/data17_cos.00319214.express_express.merge.RAW._lb0157._SFO-ALL._0001.1 --outputDAOD_SCTVALIDFile DAOD_SCTVALID.pool.root cd ../athena git diff git status git add InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ByteStreamErrorsSvc.h git add InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ByteStreamErrorsSvc.cxx git add InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ByteStreamErrorsSvc.h git add InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx git commit -am "Updates for SCT dynamic chip (un)masking. First masked chip information is added." git push --set-upstream origin 21.0-SCTDynamicChip-v1 git branch †http://www.backlog.jp/git-guide/reference/branch.html git cherry-pick †https://teratail.com/questions/297 # Apply changes of branch A to branch B git branch git checkout A git log # check commit hash xxxxx git checkout B git cherry-pick xxxxxx # git diff shows nothing git push --set-upstream origin B 変更をhttps://gitlab.cern.ch/atlas/athena/に反映させる †https://atlassoftwaredocs.web.cern.ch/gittutorial/merge-request/ RunTier0Tests.py †cd ../build asetup Athena 21.0 r2017-04-19 cmake -DATLAS_PACKAGE_FILTER_FILE=../package_filters.txt ../athena/Projects/WorkDir make -j cd ../ export TestArea=$PWD cd ./run source ../build/x86_64-slc6-gcc62-opt/setup.sh RunTier0Tests.py コンフリクトした場合 †https://gitlab.cern.ch/atlas/athena/merge_requests/5357 のコンフリクトは、これで解決できた。 git fetch https://:@gitlab.cern.ch:8443/oda/athena.git master-SCT_ReadCalibDataSvc # git checkout -b master-SCT_ReadCalibDataSvc FETCH_HEAD # Skipped because I have the branch already. git pull git fetch upstream git merge upstream/master # nano editor will be opened. # Fix conflicts git push https://:@gitlab.cern.ch:8443/oda/athena.git master-SCT_ReadCalibDataSvc
こっちは試してない。 git atlas init-workdir https://:@gitlab.cern.ch:8443/atlas/athena.git cd athena git atlas addpkg DerivationFrameworkExotics git checkout -b 21.2-varRjets-2017-09-01 FETCH_HEAD git fetch upstream git merge upstream/21.2 --no-ff RESOLVE git add PhysicsAnalysis/DerivationFramework/DerivationFrameworkExotics/share/EXOT3.py git commit -m "Merged the updated EXOT3 version with most recent version." git push https://:@gitlab.cern.ch:8443/miochoa/athena.git 21.2-varRjets-2017-09-01 git pull †git pull upstream master git push --set-upstream origin master # upstream が atlas/athena https://techacademy.jp/magazine/10274 Merge Request †https://gitlab.cern.ch/atlas/athena/merge_requests?author_username=oda&scope=all&state=all git diff with tags †git diff --name-only nightly/master/2017-04-26T2125 nightly/master/2017-04-27T2125 git revert †git revert --no-edit 9903643c6272750c68b545e4dd9f7b4e18ec956f Nightly tag †git checkout -b master-ATLASRECTS-4021-debug-v1 nightly/master/2017-04-26T2125 --no-track tac †ファイルを逆順に標準出力へ出力する Sparse checkout †mkdir ~/athena_SC/ cd ~/athena_SC/ export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase alias setupATLAS='source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh' setupATLAS lsetup git git atlas init-workdir https://:@gitlab.cern.ch:8443/atlas/athena.git cd athena git atlas addpkg SCT_ConditionsTools git fetch upstream git checkout -b master-SCT_DCS_CondAlg upstream/master --no-track cd .. mkdir build cd build asetup Athena master r04 cp ../athena/Projects/WorkDir/package_filters_example.txt ../package_filters.txt emacs -nw ../package_filters.txt # Add # + InnerDetector/InDetConditions/SCT_ConditionsServices # Comment out # + Control/AthenaExamples/AthExHelloWorld cmake -DATLAS_PACKAGE_FILTER_FILE=../package_filters.txt ../athena/Projects/WorkDir make -j source x86_64-slc6-gcc62-opt/setup.sh cd ../athena git push git push --set-upstream origin master-SCT_DCS_CondAlg # update codes # compile codes # test codes git commit -a -am "Write some comments" git push rebase †git checkout master-SCT_DCS_CondAlg-v2 git rebase -i HEAD~n # replace n-1 pick by s git pull git push コミットする前に、コミットされた状態に戻す時 †git checkout ファイル名 http://megadreams14.com/?p=287 If you want to make a new branch from a release †git checkout -b 21.0.53-nophoton release/21.0.53 --no-track CIを再始動するための裏技 †
Jenkins please retry a build https://github.com/jenkinsci/gitlab-plugin/issues/541 Opening the software †github,gitlab,bitbucketでの差分確認URLまとめ †gitlab.cern.ch差分 †
URLの変更 †httpsでcloneした後で、sshでpushしようと思った時など。 URLの確認は git remote -v でできて、変更は git remote set-url upstream ssh://git@gitlab.cern.ch:7999/atlas/athena.git git remote set-url origin ssh://git@gitlab.cern.ch:7999/oda/athena.git などとする。 SSHを使うには公開鍵の登録が必要。 |