SlideShare una empresa de Scribd logo
1 de 17
Day - 2
@2020 copyright KalKey training
GIT - LIFE CYCLE
1
Clone the git
repository as a
working copy.
2
Modify the working
copy by adding/editing
files.
3
If necessary, also
update the working
copy by taking other
developer's changes.
4
Review the changes
before commit.
5
Commit changes. If
everything is fine, then
push the changes to
the repository.
6
After committing, if
something is wrong,
then correct the last
commit and push the
changes to the
repository.
@2020 copyright KalKey training
@2020 copyright KalKey training
GITHUB
• GitHub is a code hosting platform for collaboration and version
control.
• GitHub lets you (and others) work together on projects.
• GitHub essentials are:
Repositories
Branches
Commits
Pull Requests
Git (the version control software GitHub is built on)
@2020 copyright KalKey training
Repository
• A GitHub repository can be used to store a development project.
• It can contain folders and any type of files (HTML, CSS, JavaScript, Documents, Data, Images).
• A GitHub repository should also include a license file and a README file about the project.
• A GitHub repository can also be used to store ideas, or any resources that you want to share.
@2020 copyright KalKey training
Branch
• A GitHub branch is used to work with different versions of a repository at the same time.
• By default a repository has a master branch (a production branch).
• Any other branch is a copy of the master branch (as it was at a point in time).
• New Branches are for bug fixes and feature work separate from the master branch. When changes are
ready, they can be merged into the master branch. If you make changes to the master branch while
working on a new branch, these updates can be pulled in.
Commits
• At GitHub, changes are called commits.
• Each commit (change) has a description explaining why a change was made.
@2020 copyright KalKey training
Pull Requests
• Pull Requests are the heart of GitHub collaboration.
• With a pull request you are proposing that your changes should be merged (pulled in) with the master.
@2020 copyright KalKey training
Open an account in GitHub
@2020 copyright KalKey training
To create a new repository
1. In the upper right corner, next to your avatar or identicon, click + and then select new
repository.
2. Name your repository hello-world1.
3. Write a short description.
4. Select Initialize this repository with a README.
@2020 copyright KalKey training
@2020 copyright KalKey training
To create a new branch
1. Go to your new repository hello-world.
2. Click the drop down at the top of the file list that says branch: master.
3. Type a branch name, INB-1, into the new branch text box.
4. Select the blue Create branch box or hit “Enter” on your keyboard.
@2020 copyright KalKey training
@2020 copyright KalKey training
Make and commit changes
• Click the readme.md file.
• Click the pencil icon in the upper right corner of the file view to edit.
• In the editor, write a bit about yourself.
• Write a commit message that describes your changes.
• Click Commit changes button.
• These changes will be made to just the README file on your INB-1 branch, so now this branch
contains content that’s different from master.
@2020 copyright KalKey training
Open a Pull Request
• Nice edits! Now that you have changes in a branch off of master, you can open a pull request.
• Pull Requests are the heart of collaboration on GitHub. When you open a pull request, you’re
proposing your changes and requesting that someone review and pull in your contribution
and merge them into their branch. Pull requests show diffs, or differences, of the content from
both branches. The changes, additions, and subtractions are shown in green and red.
• As soon as you make a commit, you can open a pull request and start a discussion, even
before the code is finished.
• You can even open pull requests in your own repository and merge them yourself. It’s a great
way to learn the GitHub flow before working on larger projects.
• Open a Pull Request for changes to the README
• When you’re done with your message, click Create pull request!
@2020 copyright KalKey training
Merge your Pull Request
In this final step, it’s time to bring your changes together – merging your INB-1 branch into the
master branch.
1. Click the green Merge pull request button to merge the changes into master.
2. Click Confirm merge.
3. Go ahead and delete the branch, since its changes have been incorporated, with the Delete
branch button in the purple box.
@2020 copyright KalKey training
BitBucket
• Bitbucket is a web-based version control repository hosting service owned by Atlassian, for source code
and development projects that use either Mercurial or Git revision control systems. Bitbucket offers both
commercial plans and free accounts.
Bitbucket is mostly used for code and code review. Bitbucket supports the following features:
• Pull requests with code review and comments
• Bitbucket Pipelines, a continous delivery service
• 2 step verification and required two step verification.
• Merge Checks
• Code search (Alpha)]
• Git Large File Storage (LFS)
• Documentation, including automatically rendered README files in a variety of Markdown-like file formats
• Issue tracking
• Static sites hosted on Bitbucket Cloud: Static websites have the bitbucket.io domain in their URL
• Add-ons and integrations.
@2020 copyright KalKey training
Open an account in BitBucket
@2020 copyright KalKey training

Más contenido relacionado

La actualidad más candente

2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final
Mythri P K
 
Git with bitbucket
Git with bitbucketGit with bitbucket
Git with bitbucket
Sumin Byeon
 
Migrating to git
Migrating to gitMigrating to git
Migrating to git
Xpand IT
 

La actualidad más candente (20)

Git with bitbucket
Git with bitbucketGit with bitbucket
Git with bitbucket
 
Introduction to Git and GitHub Part 2
Introduction to Git and GitHub Part 2Introduction to Git and GitHub Part 2
Introduction to Git and GitHub Part 2
 
Git tutorial git branches 20131206-Bryan
Git tutorial   git branches 20131206-BryanGit tutorial   git branches 20131206-Bryan
Git tutorial git branches 20131206-Bryan
 
Branch to branch by Photis Patriotis
Branch to branch by Photis PatriotisBranch to branch by Photis Patriotis
Branch to branch by Photis Patriotis
 
Version control git day02
Version control   git day02Version control   git day02
Version control git day02
 
CI/CD with Bitbucket pipelines
CI/CD with Bitbucket pipelinesCI/CD with Bitbucket pipelines
CI/CD with Bitbucket pipelines
 
2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final
 
Git with bitbucket
Git with bitbucketGit with bitbucket
Git with bitbucket
 
Integrating Git, Gerrit and Jenkins/Hudson with Mylyn
Integrating Git, Gerrit and Jenkins/Hudson with MylynIntegrating Git, Gerrit and Jenkins/Hudson with Mylyn
Integrating Git, Gerrit and Jenkins/Hudson with Mylyn
 
A prentation on github
A prentation on githubA prentation on github
A prentation on github
 
Git branching strategies
Git branching strategiesGit branching strategies
Git branching strategies
 
Workshop on Git and GitHub
Workshop on Git and GitHubWorkshop on Git and GitHub
Workshop on Git and GitHub
 
Version control with git
Version control with gitVersion control with git
Version control with git
 
Migrating to git
Migrating to gitMigrating to git
Migrating to git
 
Bringing Pull Request to Gerrit
Bringing Pull Request to GerritBringing Pull Request to Gerrit
Bringing Pull Request to Gerrit
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 
Intro to Git & GitHub
Intro to Git & GitHubIntro to Git & GitHub
Intro to Git & GitHub
 
Bitbucket pipelines
Bitbucket pipelinesBitbucket pipelines
Bitbucket pipelines
 
Git/Gerrit with TeamForge
Git/Gerrit with TeamForgeGit/Gerrit with TeamForge
Git/Gerrit with TeamForge
 
Git presentation
Git presentationGit presentation
Git presentation
 

Similar a Version control git day02

Similar a Version control git day02 (20)

Version control git day01
Version control   git day01Version control   git day01
Version control git day01
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1
 
Git Pull Requests
Git Pull RequestsGit Pull Requests
Git Pull Requests
 
Introduction to github slideshare
Introduction to github slideshareIntroduction to github slideshare
Introduction to github slideshare
 
Get Git with It! A Developer's Workshop.pptx
Get Git with It! A Developer's Workshop.pptxGet Git with It! A Developer's Workshop.pptx
Get Git with It! A Developer's Workshop.pptx
 
Advance workshop on git
Advance workshop on gitAdvance workshop on git
Advance workshop on git
 
Git tech
Git techGit tech
Git tech
 
Git hub ppt presentation
Git hub ppt presentationGit hub ppt presentation
Git hub ppt presentation
 
Get your Git on GitHub
Get your Git on GitHubGet your Git on GitHub
Get your Git on GitHub
 
Using git hub for your code
Using git hub for your codeUsing git hub for your code
Using git hub for your code
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdf
 
Git and Github workshop ppt slide by slide
Git and Github workshop ppt slide by slideGit and Github workshop ppt slide by slide
Git and Github workshop ppt slide by slide
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdf
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdf
 
GitHub Workflows for Technical Communication
GitHub Workflows for Technical CommunicationGitHub Workflows for Technical Communication
GitHub Workflows for Technical Communication
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptx
 
GDSC Git event 2023.pptx
GDSC Git event 2023.pptxGDSC Git event 2023.pptx
GDSC Git event 2023.pptx
 
02-version control(DevOps Series)
02-version control(DevOps Series)02-version control(DevOps Series)
02-version control(DevOps Series)
 
Git hub party-20151008
Git hub party-20151008Git hub party-20151008
Git hub party-20151008
 
Version control
Version controlVersion control
Version control
 

Más de Gourav Varma (20)

Jenkins introduction
Jenkins introductionJenkins introduction
Jenkins introduction
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 
Aws day 4
Aws day 4Aws day 4
Aws day 4
 
Aws day 3
Aws day 3Aws day 3
Aws day 3
 
Aws day 2
Aws day 2Aws day 2
Aws day 2
 
Ansible day 4
Ansible day 4Ansible day 4
Ansible day 4
 
Ansible day 3
Ansible day 3Ansible day 3
Ansible day 3
 
Adnible day 2.ppt
Adnible day   2.pptAdnible day   2.ppt
Adnible day 2.ppt
 
Ansible day 1.ppt
Ansible day 1.pptAnsible day 1.ppt
Ansible day 1.ppt
 
Dev ops
Dev opsDev ops
Dev ops
 
Shell programming 2
Shell programming 2Shell programming 2
Shell programming 2
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Final terraform
Final terraformFinal terraform
Final terraform
 
Docker swarm
Docker swarmDocker swarm
Docker swarm
 
Docker advance topic (2)
Docker advance topic (2)Docker advance topic (2)
Docker advance topic (2)
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 
Introduction of devops
Introduction of devopsIntroduction of devops
Introduction of devops
 
Docker advance1
Docker advance1Docker advance1
Docker advance1
 

Último

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Último (20)

SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 

Version control git day02

  • 1. Day - 2 @2020 copyright KalKey training
  • 2. GIT - LIFE CYCLE 1 Clone the git repository as a working copy. 2 Modify the working copy by adding/editing files. 3 If necessary, also update the working copy by taking other developer's changes. 4 Review the changes before commit. 5 Commit changes. If everything is fine, then push the changes to the repository. 6 After committing, if something is wrong, then correct the last commit and push the changes to the repository. @2020 copyright KalKey training
  • 4. GITHUB • GitHub is a code hosting platform for collaboration and version control. • GitHub lets you (and others) work together on projects. • GitHub essentials are: Repositories Branches Commits Pull Requests Git (the version control software GitHub is built on) @2020 copyright KalKey training
  • 5. Repository • A GitHub repository can be used to store a development project. • It can contain folders and any type of files (HTML, CSS, JavaScript, Documents, Data, Images). • A GitHub repository should also include a license file and a README file about the project. • A GitHub repository can also be used to store ideas, or any resources that you want to share. @2020 copyright KalKey training
  • 6. Branch • A GitHub branch is used to work with different versions of a repository at the same time. • By default a repository has a master branch (a production branch). • Any other branch is a copy of the master branch (as it was at a point in time). • New Branches are for bug fixes and feature work separate from the master branch. When changes are ready, they can be merged into the master branch. If you make changes to the master branch while working on a new branch, these updates can be pulled in. Commits • At GitHub, changes are called commits. • Each commit (change) has a description explaining why a change was made. @2020 copyright KalKey training
  • 7. Pull Requests • Pull Requests are the heart of GitHub collaboration. • With a pull request you are proposing that your changes should be merged (pulled in) with the master. @2020 copyright KalKey training
  • 8. Open an account in GitHub @2020 copyright KalKey training
  • 9. To create a new repository 1. In the upper right corner, next to your avatar or identicon, click + and then select new repository. 2. Name your repository hello-world1. 3. Write a short description. 4. Select Initialize this repository with a README. @2020 copyright KalKey training
  • 11. To create a new branch 1. Go to your new repository hello-world. 2. Click the drop down at the top of the file list that says branch: master. 3. Type a branch name, INB-1, into the new branch text box. 4. Select the blue Create branch box or hit “Enter” on your keyboard. @2020 copyright KalKey training
  • 13. Make and commit changes • Click the readme.md file. • Click the pencil icon in the upper right corner of the file view to edit. • In the editor, write a bit about yourself. • Write a commit message that describes your changes. • Click Commit changes button. • These changes will be made to just the README file on your INB-1 branch, so now this branch contains content that’s different from master. @2020 copyright KalKey training
  • 14. Open a Pull Request • Nice edits! Now that you have changes in a branch off of master, you can open a pull request. • Pull Requests are the heart of collaboration on GitHub. When you open a pull request, you’re proposing your changes and requesting that someone review and pull in your contribution and merge them into their branch. Pull requests show diffs, or differences, of the content from both branches. The changes, additions, and subtractions are shown in green and red. • As soon as you make a commit, you can open a pull request and start a discussion, even before the code is finished. • You can even open pull requests in your own repository and merge them yourself. It’s a great way to learn the GitHub flow before working on larger projects. • Open a Pull Request for changes to the README • When you’re done with your message, click Create pull request! @2020 copyright KalKey training
  • 15. Merge your Pull Request In this final step, it’s time to bring your changes together – merging your INB-1 branch into the master branch. 1. Click the green Merge pull request button to merge the changes into master. 2. Click Confirm merge. 3. Go ahead and delete the branch, since its changes have been incorporated, with the Delete branch button in the purple box. @2020 copyright KalKey training
  • 16. BitBucket • Bitbucket is a web-based version control repository hosting service owned by Atlassian, for source code and development projects that use either Mercurial or Git revision control systems. Bitbucket offers both commercial plans and free accounts. Bitbucket is mostly used for code and code review. Bitbucket supports the following features: • Pull requests with code review and comments • Bitbucket Pipelines, a continous delivery service • 2 step verification and required two step verification. • Merge Checks • Code search (Alpha)] • Git Large File Storage (LFS) • Documentation, including automatically rendered README files in a variety of Markdown-like file formats • Issue tracking • Static sites hosted on Bitbucket Cloud: Static websites have the bitbucket.io domain in their URL • Add-ons and integrations. @2020 copyright KalKey training
  • 17. Open an account in BitBucket @2020 copyright KalKey training