Presentation is loading. Please wait.

Presentation is loading. Please wait.

ALICE-Juniors Meeting

Similar presentations


Presentation on theme: "ALICE-Juniors Meeting"— Presentation transcript:

1 ALICE-Juniors Meeting
4 December 2017 Basics of Git and ALICE Software Shyam Kumar [Junior Representative of ALICE-India Group] Department of Physics, IIT Bombay, Mumbai 4/12/2017

2 Outline Why Git ? Git from Commands and Manual
Committing the code (Manual) Basics of ALICE Software Adding Class in ALIROOT Summary 4/12/2017

3 Why Git ? Google Drive Git Repository Uploading a file and replacing
No history of files very hard to find changes Complete history of files PMD Not Good for cases When many Peoples are working on common Project Very helpful When many Peoples are working on common Project Example 4/12/2017

4 My Latest committed class
Red (-ve ) : Removed lines Green (+ve ): Added lines Git Repository (Good Job) 4/12/2017

5 Git from Commands and Manual
Your Git use name Login here and Fork git clone path git clone (It will download and extract both) [Command line] Download Zip: Tar file then just extract [Manual] 4/12/2017

6 After Login 4/12/2017

7 Cloning Check the status always Download changes Added a file Lecture…. In PhD work but not in repository Added a file Lecture…. 4/12/2017

8 After adding tried to commit
Configure username and mail id Push the changes on repository User name : Simple-Shyam Next line is password enter this will push the changes 4/12/2017

9 Previous Steps 4/12/2017

10 Done changes in isto.c in my desktop not in repository (Some time you modified aliroot class)
Do un-changes in code 4/12/2017

11 Difference between git pull and git pull --rebase
Git Commands git log –oneline : History later enter q for quit git branch : It will show the branch on which you are git log –online –all --decorate :this will show all branch with commits git pull git pull –rebase git checkout master Difference between git pull and git pull --rebase 4/12/2017

12 4/12/2017

13 Manually committing (No commands)
Upload file 4/12/2017

14 Upload files as we do normally
Put the message in this line related to file Click on commit changes (Very simple) done !!!!! 4/12/2017

15 You can also look at the history
Delete a file if wrongly committed (Edit of delete) 4/12/2017

16 For deleting again require commit changes put messages
4/12/2017

17 Adding a directory 4/12/2017

18 Created directory now you can upload files
4/12/2017

19 Committing the code (Manual)
Forked repository Instruction for commit 4/12/2017

20 Forked repository 4/12/2017

21 After uploading your code just make pull request convener will approve then It will be in AliRoot/AliPhysics [ I have always done like this] 4/12/2017

22 Conflict came: Click on resolve conflicts (solved my case)
4/12/2017

23 Basics of ALICE Software
Go into the AliRoot directory, and do: git fetch --all git reset --hard v You can proceed with aliBuild normally. 4/12/2017

24 Always check git status
Update AliPhysics Always check git status It will tell if some files are modified, It can create problem in building 4/12/2017

25 Finally run the command below in the specified directory and follow instruction
4/12/2017

26 You can build on this path also [AliRoot]
What Exactly make do ???? 4/12/2017

27 Every directory will contain a CMakeLists
Every directory will contain a CMakeLists.txt in any framework ALICE/CMS/ ATLAS/PANDA….. 4/12/2017

28 You can build on this path also [AliPhysics]
How #include “example.h” works in classes we never give the path? ?? example.h can be anywhere. 4/12/2017

29 How the code knows where is this class?
Every directory will contain a LinkDef.h in any framework ALICE/CMS/ ATLAS/PANDA….. [It also included in Cmake file, This do the dynamic linking of libraries during compilation 4/12/2017

30 Adding Class in ALIROOT
4/12/2017

31 You can build also specified directory [correlationHF]
4/12/2017

32 Summary Play with Git commands as much as you can on your local repository !!!!! Try Other git commands on your repository given in link below Thank You 4/12/2017


Download ppt "ALICE-Juniors Meeting"

Similar presentations


Ads by Google