GIT in PandaRoot Ralf Kliemt Panda Meeting I 2017 � 1
A Small GIT Tutorial Repositories pandaatfair.githost.io UserSpace PandaRootGroup Local Computer � 2
A Small GIT Tutorial Repositories pandaatfair.githost.io UserSpace PandaRootGroup mainrepo origin Shortcuts • origin: ...githost.io/<user>/PandaRoot.git • mainrepo: ...githost.io/PandaRootGroup/PandaRoot.git Local Computer � 3
A Small GIT Tutorial Repositories UserSpace PandaRootGroup Local Computer � 4
A Small GIT Tutorial Repositories fork merge req. UserSpace PandaRootGroup push fetch + rebase clone Local Computer � 5
A Small GIT Tutorial Repositories fork merge req. UserSpace PandaRootGroup push clone, pull fetch + rebase Other Local Computer � 6
A Small GIT Tutorial Repositories 0 0 Fork once on the website fork git clone 1 merge req. https://pandaatfair.githost.io/<user>/PandaRoot.git 4 UserSpace PandaRootGroup git fetch mainrepo 2 don't forget to rebase git push 3 push 2 after rebase use git push -f fetch + rebase 3 clone 1 Create Merge Request on website 4 Local Computer � 7
A Small GIT Tutorial Repositories mainrepo origin 0 Fork once on the website fork git clone 1 merge req. https://pandaatfair.githost.io/<user>/PandaRoot.git UserSpace PandaRootGroup git fetch mainrepo 2 don't forget to rebase clone git push push -f 3 for Analysis only after rebase use git push -f clone, after rebase fetch + rebase pull Create Merge Request on website 4 to sync. if necessary Shortcuts • origin: ...githost.io/<user>/PandaRoot.git • mainrepo: ...githost.io/PandaRootGroup/PandaRoot.git Local Computer � 8
A Small GIT Tutorial Branches master dev � 9
A Small GIT Tutorial Branches master dev checkout -b or via website feature � 10
A Small GIT Tutorial Branches master dev checkout -b or via website feature • git status • git add <files> • git commit -m "<message>" • git checkout -- <files> • git push origin � 11
A Small GIT Tutorial Branches master merge (release) this happens on mainrepo dev checkout -b merge or via website via website feature � 12
A Small GIT Tutorial Branches master merge (release) this happens on mainrepo dev checkout -b merge or via website via website rebase feature feature-2 � 13
A Small GIT Tutorial Jump Branches checkout master master checkout dev dev checkout feature feature checkout feature-2 feature-2 � 14
A Small GIT Tutorial Preparation Development Workflow � 15
A Small GIT Tutorial Preparation Development Workflow Create a Fork on the Website (once) Setup git on each computer (once) git config --global branch.autosetuprebase always git config --global user.name "FirsName LastName" git config --global user.email johndoe@example.com git config --global core.ignorecase false � 16
A Small GIT Tutorial Preparation Development Workflow Create a Fork on the Website (once) Setup git on each computer (once) git config --global branch.autosetuprebase always git config --global user.name "FirsName LastName" git config --global user.email johndoe@example.com git config --global core.ignorecase false Download git clone https://pandaatfair.githost.io/<user>/PandaRoot.git git remote add mainrepo https://pandaatfair.githost.io/PandaRootGroup/PandaRoot.git � 17
A Small GIT Tutorial Preparation Development Workflow Create a Fork on the Website (once) Create feature branch Setup git on each computer (once) (git fetch mainrepo) git checkout -b featureXXX mainrepo/dev git config --global branch.autosetuprebase always git push -u origin featureXXX git config --global user.name "FirsName LastName" git config --global user.email johndoe@example.com git config --global core.ignorecase false Download git clone https://pandaatfair.githost.io/<user>/PandaRoot.git git remote add mainrepo https://pandaatfair.githost.io/PandaRootGroup/PandaRoot.git Switch to dev (optional) (git fetch mainrepo) git checkout -b dev mainrepo/dev (git push -u origin dev) � 18
A Small GIT Tutorial Preparation Development Workflow Create a Fork on the Website (once) Create feature branch Setup git on each computer (once) (git fetch mainrepo) git checkout -b featureXXX mainrepo/dev git config --global branch.autosetuprebase always git push -u origin featureXXX git config --global user.name "FirsName LastName" git config --global user.email johndoe@example.com Update news to feature branch git config --global core.ignorecase false git fetch mainrepo Download git checkout featureXXX git clone git rebase mainrepo/dev https://pandaatfair.githost.io/<user>/PandaRoot.git git remote add mainrepo https://pandaatfair.githost.io/PandaRootGroup/PandaRoot.git Switch to dev (optional) (git fetch mainrepo) git checkout -b dev mainrepo/dev (git push -u origin dev) � 19
A Small GIT Tutorial Preparation Development Workflow Create a Fork on the Website (once) Create feature branch Setup git on each computer (once) (git fetch mainrepo) git checkout -b featureXXX mainrepo/dev git config --global branch.autosetuprebase always git push -u origin featureXXX git config --global user.name "FirsName LastName" git config --global user.email johndoe@example.com Update news to feature branch git config --global core.ignorecase false git fetch mainrepo Download git checkout featureXXX git clone git rebase mainrepo/dev https://pandaatfair.githost.io/<user>/PandaRoot.git git remote add mainrepo Upload feature branch https://pandaatfair.githost.io/PandaRootGroup/PandaRoot.git Switch to dev (optional) git push -f origin (git fetch mainrepo) git checkout -b dev mainrepo/dev (git push -u origin dev) More details on panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRoot � 20
Thanks for your attention.
A Small GIT Tutorial Preparation Development Workflow Create a Fork on the Website (once) Create feature branch Setup git on each computer (once) (git fetch mainrepo) git checkout -b featureXXX mainrepo/dev git config --global branch.autosetuprebase always git push -u origin featureXXX git config --global user.name "FirsName LastName" git config --global user.email johndoe@example.com Update news to feature branch git config --global core.ignorecase false git fetch mainrepo Download git checkout featureXXX git clone git rebase mainrepo/dev https://pandaatfair.githost.io/<user>/PandaRoot.git git remote add mainrepo Upload feature branch https://pandaatfair.githost.io/PandaRootGroup/PandaRoot.git Switch to dev (optional) git push -f origin (git fetch mainrepo) git checkout -b dev mainrepo/dev (git push -u origin dev) More details on panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRoot � 22
Recommend
More recommend