1. Git and GitHub
- The beginning -
PhD Student Gemma CatolinoCourse of Software Engineering 2017/2018
2. SUMMARY
1. SET UP THE ENVIRONMENT
2.GIT E GitHub
3. Git: HOW TO WORK
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
3. SUMMARY
1. SET UP THE ENVIRONMENT
2.GIT E GitHub
3. Git: HOW TO WORK
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
4. Course of Software Engineering 2017/2018
LINUX (Debian)
WINDOWS
MAC OS X http://git-scm.com/download/mac
http://git-scm.com/download/win
Command:sudo yum install gitLINUX (Fedora)
Command:sudo apt-get install git
PhD Student Gemma Catolino
9. A SYSTEM THAT KEEPS RECORD OF YOUR CHANGE
VERSION CONTROL
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
10. VERSION CONTROL
ALLOWS DEVELOPERS TO COLLABORATE AND KNOW
WHO MADE WHAT CHANGES AND WHEN
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
11. VERSION CONTROL
ALLOWS DEVELOPERS TO REVERT ANY CHANGE AND GO
BACK TO A PREVIOUS STATE OF A SYSTEM!!!
ALLOWS DEVELOPERS TO COLLABORATE AND KNOW
WHO MADE WHAT CHANGES AND WHEN
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
12. VERSION CONTROL
DEVELOPERS CAN KEEP THEIR SOURCE CODE AND ITS HISTORY
ON THEIR PC, MAKING THEIR CHANGE
ALLOWS DEVELOPERS TO REVERT ANY CHANGE AND GO
BACK TO A PREVIOUS STATE OF A SYSTEM!!!
ALLOWS DEVELOPERS TO COLLABORATE AND KNOW
WHO MADE WHAT CHANGES AND WHEN
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
15. VERSION CONTROL
A WEB-BASED GIT OR VERSION CONTROL REPOSITORYAND
INTERNET HOSTING SERVICE
SOCIAL CODING
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
16. VERSION CONTROL
BUG TRACKINGPULL REQUEST
SOCIAL CODING
A WEB-BASED GIT OR VERSION CONTROL REPOSITORYAND
INTERNET HOSTING SERVICE
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
17. SUMMARY
1. SET UP THE ENVIRONMENT
2.GIT E GitHub
3. Git: HOW TO WORK
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
24. CREATE YOUR WORKING AREA - REPOSITORY
Command:git init
Create your repository
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
25. Command:git init
Create your repository
BASED ON THE TYPE OF THE PROJECT,
AND PROGRAMMING LANGUAGE,
GITHUB ALLOWS TO BUILD
AUTOMATICALLYTHE GITIGNORE DOCUMENT
I SUGGESTYOU TO INITIALIZE YOUR REPOSITORY ON GITHUB!!!
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
CREATE YOUR WORKING AREA - REPOSITORY
26. Command:git init
VCS AUTOMATICALLY UNDERSTAND THE FILES WHICH SHOULD
NOT BE CHANGED DURING THE VARIOUS CHANGES
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
Create your repository
CREATE YOUR WORKING AREA - REPOSITORY
BASED ON THE TYPE OF THE PROJECT,
AND PROGRAMMING LANGUAGE,
GITHUB ALLOWS TO BUILD
AUTOMATICALLYTHE GITIGNORE DOCUMENT
28. CHECKOUT REPOSITORIES
Command
git clone /Path/of/repository
GO ON THE PAGE OF YOUR REPOSITORY
AND CLICK ON CLONE AND COPYTHE LINK.
MOVE TO GIT BASH AND DIGIT
git clone “link github”
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
29. ADD AND VALIDATION OF FILE
ADD
git add <name of file>
git add * (all the file)
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
30. Check the state of your local repository compared to the GitHub repository
Command
git status
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
ADD AND VALIDATION OF FILE
31. AGGIUNTA E VALIDAZIONE FILE
ONCE YOU ADDED FILES IN YOUR REPOSITORY,YOU CAN MAKE A COMMITOPERATION
git commit -m “Commit Message”
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
ADD
git add <name of file>
git add * (all the file)
32. AGGIUNTA E VALIDAZIONE FILE
EVERYTIME YOU MODIFYA FILE,YOU SHOULD MAKE A COMMITOPERATION
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
git commit -m “Commit Message”
ADD
git add <name of file>
git add * (all the file)
33. INVIO DELLE MODIFICHE
Command:git push origin master
TO MOVE YOUR CHANGES FROM YOUR WORKING AREA INTO THE REMOTE REPOSITORY,
YOU MUST MAKE A PUSHOPERATION!
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
34. AGGIORNAMENTO, MERGE, SOSTITUZIONE
git pull
Update the local repository to the latest version
Command
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
35. AGGIORNAMENTO, MERGE, SOSTITUZIONE
git pull
Update the local repository to the latest version
git fetch origin
git checkout -- <namefile>
Recover changes from the remote repository on your local version
Command
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
36. AGGIORNAMENTO, MERGE, SOSTITUZIONE
git merge
Incorporate changes between the remote server version and your local version,
it is not an automated procedure!
Command
git pull
Aggiornare il repository locale al commit più recente
git fetch origin
git checkout -- <namefile>
Recover changes from the remote repository on your local version
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
37. BRANCH
USED TO DEVELOP FEATURES THATARE INDEPENDENT FROM EACH OTHER .
BY DEFAULT,THE MASTER BRANCH IS THE FIRST ONE THAT IS CREATED.
Command
git brach new_branch_name
Create a new branch
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
38. BRANCH
git brach new_branch_name
Create a new branch
git checkout other_branch_name
To switch from one brach to another
Command
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
USED TO DEVELOP FEATURES THATARE INDEPENDENT FROM EACH OTHER .
BY DEFAULT,THE MASTER BRANCH IS THE FIRST ONE THAT IS CREATED.
39. BRANCH
git brach new_branch_name
Create a new branch
git checkout other_branch_name
To switch from one brach to another
git branch -d branch_name
Delete a branch
Command
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
THE BRANCH IS USED TO DEVELOP FEATURE THATARE ISOLATED FROM EACH OTHER
40. BRANCH
git brach new_branch_name
Create a new branch
git checkout other_branch_name
To switch from one brach to another
git branch -d branch_name
Delete a branch
Command
TO INCORPORATE YOUR BRANCH INTO THE BRANCH MASTER
YOU SHOULD USE THE MERGE OPERATION
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino
41. FOR IDE
DOWNLAOD ECLIPSE GITTEAM PROVIDER
Course of Software Engineering 2017/2018 PhD Student Gemma Catolino