GIT in PandaRoot Ralf Kliemt Panda Meeting I 2017 1 A Small GIT - - PowerPoint PPT Presentation

git in pandaroot
SMART_READER_LITE
LIVE PREVIEW

GIT in PandaRoot Ralf Kliemt Panda Meeting I 2017 1 A Small GIT - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

GIT in PandaRoot

Ralf Kliemt Panda Meeting I 2017

  • 1
slide-2
SLIDE 2

A Small GIT Tutorial

2

Repositories Local Computer UserSpace PandaRootGroup pandaatfair.githost.io

slide-3
SLIDE 3

A Small GIT Tutorial

3

Repositories Local Computer UserSpace PandaRootGroup pandaatfair.githost.io

  • rigin

mainrepo Shortcuts

  • origin:

...githost.io/<user>/PandaRoot.git

  • mainrepo:

...githost.io/PandaRootGroup/PandaRoot.git

slide-4
SLIDE 4

A Small GIT Tutorial

4

Repositories Local Computer UserSpace PandaRootGroup

slide-5
SLIDE 5

A Small GIT Tutorial

5

Repositories Local Computer UserSpace PandaRootGroup fork merge req. push clone fetch + rebase

slide-6
SLIDE 6

A Small GIT Tutorial

6

Repositories Local Computer UserSpace PandaRootGroup fork merge req. push clone, pull fetch + rebase Other

slide-7
SLIDE 7

A Small GIT Tutorial

7

Repositories Local Computer UserSpace PandaRootGroup fork merge req. push clone fetch + rebase

1 2 3 4 1 2 3 4

Fork once on the website git clone

https://pandaatfair.githost.io/<user>/PandaRoot.git

git fetch mainrepo

don't forget to rebase

git push after rebase use git push -f Create Merge Request on website

slide-8
SLIDE 8

A Small GIT Tutorial

8

Repositories Local Computer UserSpace PandaRootGroup fork merge req. push -f

after rebase

clone, pull

to sync. if necessary

clone

for Analysis only

fetch + rebase

1 2 3 4

Fork once on the website git clone

https://pandaatfair.githost.io/<user>/PandaRoot.git

git fetch mainrepo

don't forget to rebase

git push after rebase use git push -f Create Merge Request on website Shortcuts

  • origin:

...githost.io/<user>/PandaRoot.git

  • mainrepo:

...githost.io/PandaRootGroup/PandaRoot.git

  • rigin

mainrepo

slide-9
SLIDE 9

9

A Small GIT Tutorial

master dev Branches

slide-10
SLIDE 10

10

A Small GIT Tutorial

master dev feature Branches checkout -b

  • r via website
slide-11
SLIDE 11

11

A Small GIT Tutorial

master dev feature Branches checkout -b

  • r via website
  • git status
  • git add <files>
  • git commit -m "<message>"
  • git checkout -- <files>
  • git push origin
slide-12
SLIDE 12

12

A Small GIT Tutorial

master dev feature Branches merge (release)

this happens on mainrepo

merge

via website

checkout -b

  • r via website
slide-13
SLIDE 13

13

A Small GIT Tutorial

master dev feature merge

via website

rebase checkout -b

  • r via website

Branches feature-2 merge (release)

this happens on mainrepo

slide-14
SLIDE 14

14

A Small GIT Tutorial

master dev feature feature-2 checkout feature Jump Branches checkout dev checkout master checkout feature-2

slide-15
SLIDE 15

15

A Small GIT Tutorial

Preparation Development Workflow

slide-16
SLIDE 16

16

A Small GIT Tutorial

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

Preparation Development Workflow Create a Fork on the Website (once) Setup git on each computer (once)

slide-17
SLIDE 17

17

A Small GIT Tutorial

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

Preparation Download Development Workflow

git clone https://pandaatfair.githost.io/<user>/PandaRoot.git git remote add mainrepo https://pandaatfair.githost.io/PandaRootGroup/PandaRoot.git

Create a Fork on the Website (once) Setup git on each computer (once)

slide-18
SLIDE 18

18

A Small GIT Tutorial

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

Preparation Download Development Workflow

git clone https://pandaatfair.githost.io/<user>/PandaRoot.git git remote add mainrepo https://pandaatfair.githost.io/PandaRootGroup/PandaRoot.git (git fetch mainrepo) git checkout -b featureXXX mainrepo/dev git push -u origin featureXXX

Create a Fork on the Website (once) Setup git on each computer (once) Create feature branch

(git fetch mainrepo) git checkout -b dev mainrepo/dev (git push -u origin dev)

Switch to dev (optional)

slide-19
SLIDE 19

19

A Small GIT Tutorial

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

Preparation Download Development Workflow

git clone https://pandaatfair.githost.io/<user>/PandaRoot.git git remote add mainrepo https://pandaatfair.githost.io/PandaRootGroup/PandaRoot.git (git fetch mainrepo) git checkout -b featureXXX mainrepo/dev git push -u origin featureXXX git fetch mainrepo git checkout featureXXX git rebase mainrepo/dev

Create a Fork on the Website (once) Setup git on each computer (once) Create feature branch Update news to feature branch

(git fetch mainrepo) git checkout -b dev mainrepo/dev (git push -u origin dev)

Switch to dev (optional)

slide-20
SLIDE 20

20

A Small GIT Tutorial

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

Preparation Download Development Workflow

git clone https://pandaatfair.githost.io/<user>/PandaRoot.git git remote add mainrepo https://pandaatfair.githost.io/PandaRootGroup/PandaRoot.git (git fetch mainrepo) git checkout -b featureXXX mainrepo/dev git push -u origin featureXXX git fetch mainrepo git checkout featureXXX git rebase mainrepo/dev

Create a Fork on the Website (once) Setup git on each computer (once) Create feature branch

git push -f origin

Update news to feature branch Upload feature branch

More details on panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRoot (git fetch mainrepo) git checkout -b dev mainrepo/dev (git push -u origin dev)

Switch to dev (optional)

slide-21
SLIDE 21

Thanks for your attention.

slide-22
SLIDE 22

22

A Small GIT Tutorial

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

Preparation Download Development Workflow

git clone https://pandaatfair.githost.io/<user>/PandaRoot.git git remote add mainrepo https://pandaatfair.githost.io/PandaRootGroup/PandaRoot.git (git fetch mainrepo) git checkout -b featureXXX mainrepo/dev git push -u origin featureXXX git fetch mainrepo git checkout featureXXX git rebase mainrepo/dev

Create a Fork on the Website (once) Setup git on each computer (once) Create feature branch

git push -f origin

Update news to feature branch Upload feature branch

More details on panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRoot (git fetch mainrepo) git checkout -b dev mainrepo/dev (git push -u origin dev)

Switch to dev (optional)