1 / 37

Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps Tutorial | Edureka

** DevOps Training: https://www.edureka.co/devops ** <br>This Edureka Git Tutorial explains what is version control system and why Git is the best tool for version control. You will get to learn what is Git through various operations that Git supports. Below are the topics covered in the tutorial: <br><br>1. Version Control System <br>2. Types of Version Control System <br>3. Version Control System Tools <br>4. What is Git? <br>5. Git Features <br>6. Git Workflow <br>7. Parallel Development <br>8. Hands-On <br><br>Check our complete DevOps playlist here (includes all the videos mentioned in the video): http://goo.gl/O2vo13

EdurekaIN
Download Presentation

Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps Tutorial | Edureka

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Topics For Today’s Session Version Control System 1 Version Control System Types 2 Version Control Tools 3 Git Workflow 4 Parallel Development & Stashing 5 Hands-On 6 Devops Certification Training www.edureka.co/devops

  2. Scenario From Company Copyright © 2018, edureka and/or its affiliates. All rights reserved.

  3. Scenario Of A Company I hope client likes this new feature! Devops Certification Training www.edureka.co/devops

  4. Scenario Of A Company Sure! I will remove this feature I do not like it! So please remove this feature Devops Certification Training www.edureka.co/devops

  5. Scenario Of A Company Hey! I want that feature back! But I have already deleted that code! I have to re write the whole code again Devops Certification Training www.edureka.co/devops

  6. Chaos Caused Without Version Control Downtime may occur due to faulty updates, since there is no backup maintained No collaboration between the team. So no records are maintained. Once saved, all changes are permanent and can’t be reverted back. Devops Certification Training www.edureka.co/devops

  7. Version Control Copyright © 2018, edureka and/or its affiliates. All rights reserved.

  8. Version Control System Version control is the management of changes to documents, computer programs, large web sites, and other collections of information. These changes are usually termed as “versions”. Devops Certification Training www.edureka.co/devops

  9. Version Control Types Copyright © 2018, edureka and/or its affiliates. All rights reserved.

  10. Version Control Types Distributed Version Control System Centralized Version Control System Server Server Repository Repository Push Pull Repository Repository Repository Commit Update Commit Commit Commit Update Update Update Working Copy Working Copy Working Copy Working Copy Working Copy Working Copy Workstation/ PC #1 Workstation/ PC #2 Workstation/ PC #3 Workstation/ PC #1 Workstation/ PC #2 Workstation/ PC #3 Devops Certification Training www.edureka.co/devops

  11. Version Control System Tools Version control has various tools like Git, Apache Subversion, Concurrent Version Systems, Team Foundation Server, Mercurial etc. Devops Certification Training www.edureka.co/devops

  12. Why Git wins over other tools? Released under GPL’s license. It is for free and is open source. Economical Non -Linear Snapshots Distributed Speed Robust Integrity Branching Devops Certification Training www.edureka.co/devops

  13. Why Git wins over other tools? Released under GPL’s license. It is for free and is open source. Economical Supports non-linear development of software. Non -Linear Snapshots Distributed Speed Robust Integrity Branching Devops Certification Training www.edureka.co/devops

  14. Why Git wins over other tools? Released under GPL’s license. It is for free and is open source. Economical Supports non-linear development of software. Records changes made to a file rather than file itself. Non -Linear Snapshots Distributed Speed Robust Integrity Branching Devops Certification Training www.edureka.co/devops

  15. Why Git wins over other tools? Released under GPL’s license. It is for free and is open source. Economical Every user has his own copy of the repository data stored locally. Distributed Supports non-linear development of software. Records changes made to a file rather than file itself. Non -Linear Snapshots Speed Robust Integrity Branching Devops Certification Training www.edureka.co/devops

  16. Why Git wins over other tools? Released under GPL’s license. It is for free and is open source. Economical Every user has his own copy of the repository data stored locally. Distributed Supports non-linear development of software. Records changes made to a file rather than file itself. Non -Linear Snapshots Speed offered by Git is lightening fast compared to other VCS’s. Speed Robust Integrity Branching Devops Certification Training www.edureka.co/devops

  17. Why Git wins over other tools? Released under GPL’s license. It is for free and is open source. Economical Every user has his own copy of the repository data stored locally. Distributed Supports non-linear development of software. Records changes made to a file rather than file itself. Non -Linear Snapshots Speed offered by Git is lightening fast compared to other VCS’s. Speed Nearly every task in Git is undo-able. Robust Integrity Branching Devops Certification Training www.edureka.co/devops

  18. Why Git wins over other tools? Released under GPL’s license. It is for free and is open source. Economical Every user has his own copy of the repository data stored locally. Distributed Supports non-linear development of software. Records changes made to a file rather than file itself. Non -Linear Snapshots Speed offered by Git is lightening fast compared to other VCS’s. Speed Nearly every task in Git is undo-able. No changes can be made without Git recording it. Robust Integrity Branching Devops Certification Training www.edureka.co/devops

  19. Why Git wins over other tools? Released under GPL’s license. It is for free and is open source. Economical Every user has his own copy of the repository data stored locally. Distributed Supports non-linear development of software. Records changes made to a file rather than file itself. Non -Linear Snapshots Every collaborator’s working directory is in itself a branch. Branching Speed offered by Git is lightening fast compared to other VCS’s. Speed Nearly every task in Git is undo-able. No changes can be made without Git recording it. Robust Integrity Devops Certification Training www.edureka.co/devops

  20. Why Git wins over other tools? Released under GPL’s license. It is for free and is open source. Economical Every user has his own copy of the repository data stored locally. Distributed Supports non-linear development of software. Records changes made to a file rather than file itself. Non -Linear Snapshots Every collaborator’s working directory is in itself a branch. Branching Speed offered by Git is lightening fast compared to other VCS’s. Speed Nearly every task in Git is undo-able. No changes can be made without Git recording it. Robust Integrity Devops Certification Training www.edureka.co/devops

  21. What is Git? Git is an open source Distributed Version Control System(DVCS) which records changes made to the files laying emphasis on speed, data integrity and distributed, non-linear workflows Devops Certification Training www.edureka.co/devops

  22. Workflow of Git Devops Certification Training www.edureka.co/devops

  23. Workflow Of Git Devops Certification Training www.edureka.co/devops

  24. Parallel Development Copyright © 2018, edureka and/or its affiliates. All rights reserved.

  25. Branching Branching is an integral part of any Version Control(VC) System. Unlike other VC’s Git does not create a copy of existing files for new branch. It points to snapshot of the changes you have made in the system Devops Certification Training www.edureka.co/devops

  26. Merging Merging integrates the changes made in different branches into one single branch Devops Certification Training www.edureka.co/devops

  27. Rebasing Used when changes made in one branch needs to be reflected in another branch Devops Certification Training www.edureka.co/devops

  28. Stashing Copyright © 2018, edureka and/or its affiliates. All rights reserved.

  29. Stashing Used when changes made in one branch needs to be reflected in another branch Devops Certification Training www.edureka.co/devops

  30. Hands-On Copyright © 2018, edureka and/or its affiliates. All rights reserved.

  31. Hands-On – Problem Statement Company want a better Source Code Management System because the earlier tool had the tendency to save redundant code. Multiple Developers working simultaneously on same block of code also caused problems. Devops Certification Training www.edureka.co/devops

  32. Hands-On – Solution Task is to move the company’s code base to git and Github. Devops Certification Training www.edureka.co/devops

  33. Git Commands Basic Commands sudo apt-get install git git config --global user.name “username” git rm <filename> git diff git log git commit git add <filename> git init git status git show <tag-name> git tag --a <annotation> --m <message> git rm -f <filename> git pull origin git tag git rm --cached <filename> git push origin master git push origin --tags git fetch origin git add remote origin <remote link> Devops Certification Training www.edureka.co/devops

  34. Git Commands Branching Commands git checkout <branchname> git merge <branchname> git branch <branchname> git branch -D <branchname> git branch -d <branchname> git branch Stashing Commands git stash apply <stash id> git stash list git stash save ‘message’ git stash pop git stash drop <stack id> git stash clear Devops Certification Training www.edureka.co/devops

More Related