Presented by Repertoire of Contributions Day 2 “Hands-on-session on Git and GitHub” Brought to you by
Today's Agenda💮 ❏ What Is Git? 🤔 ❏ Git Commands 😉 ❏ Branches In Git 🤔🎓 ❏ Git And GitHub Workflow ❏ Steps To Contribute In Hacktoberfest 💻 ❏ Merging Pull Requests 🐱👤 ❏ Resource To Learn Everything About Git🎡
Software Developer Azegate IT Solutions Aman Irshad @amanirshad
Introduction to Git Git is an open source distributed version control system. Let’s break it down into simple words and see what it means.
What Is VCS?😉 ❏ A Version Control System tracks the history of changes as people and teams collaborate on projects together. ❏ As the project evolves, teams can run tests, fix bugs, and contribute new code with the confidence that any version can be recovered at any time. ❏ Developers can review project history to find the answers to questions like “which changes were made?”, “who made the changes?”, “when were the changes made?”, “why were the changes needed?”, and many more.
What is Distributed VCS? ❏ DVCSs allow full access to every file, branch, and iteration of a project, and allows every user access to a full and self-contained history of all changes. ❏ Git doesn’t need a constant connection to a central repository. ❏ Developers can work anywhere and collaborate asynchronously from any time zone. ❏ Without Version Control, team members are subject to redundant tasks, slower timelines and multiple copies of a single project.
What is Git?🤔 ❏ Git is an example of Distributed Version Control System commonly used for open source and commercial software development. ❏ According to latest statistics, more than 70 percent of developers use git, making it the most used VCS in the world. ❏ Git has significant benefits for individuals, teams and businesses.
Why use Git?💻 ❏ Git lets developers see the entire timeline of their changes, decisions, and progression of any project in one place. ❏ Developers work in every time zone. With a DVCS like Git, collaboration can happen any time while maintaining source code integrity. ❏ Using branches, developers can safely propose changes to production code. ❏ Businesses using Git can break down communication barriers between teams and keep them focused on doing their best work. ❏ Git makes it possible to align experts across a business to collaborate on major projects.
Getting Started with Git🐱👤 ❏ Downloading Git: You can download git for your specific operating system from here: https://git-scm.com/downloads ❏ The following link has the details of downloading and installing git in multiple operating systems: https://git-scm.com/book/en/v2/Getting- Started-Installing-Git ❏ You’re all set!
Git Commands🐱👤 ❏ git --version ❏ git init <directory> ❏ git add <directory> ❏ git config user.name <name> ❏ git clone <repo> For more commands visit: https://www.atlassian.com/git/tutorials/atlassian-git-cheatsheet ❏ git commit -m “message” ❏ git status ❏ git log ❏ git pull ❏ git diff
How does GitHub fit in? ● Github is a Git hosting repository that provides developers with tools to ship better code through command line features, issues, pull requests, code review, etc. ● With collaboration layers like Github flow, a community of 15 million developers, and an ecosystem with hundreds of integrations, Github changes the way software is built. ● Github builds collaboration directly into the development process.
Branches in Git Branching means you diverge from the main line of development and continue to do work without messing with that main line. Creating a new branch allows you to create a new pointer to move around. Your Work Main Branch Someone else’s Work
Git Workflow A Git workflow is a recipe or recommendation for how to use Git to accomplish work in a consistent and productive manner. Git workflows encourage developers and DevOps teams to leverage Git effectively and consistently. Git offers a lot of flexibility in how users manage changes.
GitHub Workflow ‘Master’ Branch Create Branch Commit Changes Pull Requests Get Feedback Merge Changes
What Happens After You Make A PR? ● After you make a Pull Request, the maintainer of the repository will be able to see and compare the changes you have made to the project. ● If they find some problems, they can request changes to be made and provide feedback. They will also check whether your PR has followed all the “contributing guidelines” usually mentioned in the project. ● After this is done, your PR will be merged into the required branch of the project by the maintainer. ● A PR wrongly merged can be reverted back using the “Revert” button in Github.
Contribute In Hacktoberfest ❏ Find the repository you want to make changes to. (Has to contain the “hacktoberfest” label in it) ❏ Find an issue you want to work on (preferably with the label “good- first-issue”) ❏ Fork the repo ❏ Clone the repo to local computer ❏ Make changes as required ❏ Commit changes ❏ Make a pull request ❏ Wait for your PR to get merged with the label “hacktoberfest- accepted”.
A Note To Remember ● While searching for an issue to solve, you will find that some of them already have assignees. This means that someone has already been assigned to solve the issue mentioned. ● If that is the case, try finding another issue which does not have any assignees and you can either ask the maintainer to assign you the task or you can make a pull request and link it to that particular issue.
THE END

Workshop on Git and GitHub

  • 1.
    Presented by Repertoire ofContributions Day 2 “Hands-on-session on Git and GitHub” Brought to you by
  • 2.
    Today's Agenda💮 ❏ WhatIs Git? 🤔 ❏ Git Commands 😉 ❏ Branches In Git 🤔🎓 ❏ Git And GitHub Workflow ❏ Steps To Contribute In Hacktoberfest 💻 ❏ Merging Pull Requests 🐱👤 ❏ Resource To Learn Everything About Git🎡
  • 3.
    Software Developer Azegate ITSolutions Aman Irshad @amanirshad
  • 4.
    Introduction to Git Gitis an open source distributed version control system. Let’s break it down into simple words and see what it means.
  • 5.
    What Is VCS?😉 ❏A Version Control System tracks the history of changes as people and teams collaborate on projects together. ❏ As the project evolves, teams can run tests, fix bugs, and contribute new code with the confidence that any version can be recovered at any time. ❏ Developers can review project history to find the answers to questions like “which changes were made?”, “who made the changes?”, “when were the changes made?”, “why were the changes needed?”, and many more.
  • 6.
    What is DistributedVCS? ❏ DVCSs allow full access to every file, branch, and iteration of a project, and allows every user access to a full and self-contained history of all changes. ❏ Git doesn’t need a constant connection to a central repository. ❏ Developers can work anywhere and collaborate asynchronously from any time zone. ❏ Without Version Control, team members are subject to redundant tasks, slower timelines and multiple copies of a single project.
  • 7.
    What is Git?🤔 ❏Git is an example of Distributed Version Control System commonly used for open source and commercial software development. ❏ According to latest statistics, more than 70 percent of developers use git, making it the most used VCS in the world. ❏ Git has significant benefits for individuals, teams and businesses.
  • 8.
    Why use Git?💻 ❏Git lets developers see the entire timeline of their changes, decisions, and progression of any project in one place. ❏ Developers work in every time zone. With a DVCS like Git, collaboration can happen any time while maintaining source code integrity. ❏ Using branches, developers can safely propose changes to production code. ❏ Businesses using Git can break down communication barriers between teams and keep them focused on doing their best work. ❏ Git makes it possible to align experts across a business to collaborate on major projects.
  • 9.
    Getting Started withGit🐱👤 ❏ Downloading Git: You can download git for your specific operating system from here: https://git-scm.com/downloads ❏ The following link has the details of downloading and installing git in multiple operating systems: https://git-scm.com/book/en/v2/Getting- Started-Installing-Git ❏ You’re all set!
  • 10.
    Git Commands🐱👤 ❏ git--version ❏ git init <directory> ❏ git add <directory> ❏ git config user.name <name> ❏ git clone <repo> For more commands visit: https://www.atlassian.com/git/tutorials/atlassian-git-cheatsheet ❏ git commit -m “message” ❏ git status ❏ git log ❏ git pull ❏ git diff
  • 11.
    How does GitHubfit in? ● Github is a Git hosting repository that provides developers with tools to ship better code through command line features, issues, pull requests, code review, etc. ● With collaboration layers like Github flow, a community of 15 million developers, and an ecosystem with hundreds of integrations, Github changes the way software is built. ● Github builds collaboration directly into the development process.
  • 12.
    Branches in Git Branchingmeans you diverge from the main line of development and continue to do work without messing with that main line. Creating a new branch allows you to create a new pointer to move around. Your Work Main Branch Someone else’s Work
  • 13.
    Git Workflow A Gitworkflow is a recipe or recommendation for how to use Git to accomplish work in a consistent and productive manner. Git workflows encourage developers and DevOps teams to leverage Git effectively and consistently. Git offers a lot of flexibility in how users manage changes.
  • 14.
    GitHub Workflow ‘Master’ Branch CreateBranch Commit Changes Pull Requests Get Feedback Merge Changes
  • 15.
    What Happens AfterYou Make A PR? ● After you make a Pull Request, the maintainer of the repository will be able to see and compare the changes you have made to the project. ● If they find some problems, they can request changes to be made and provide feedback. They will also check whether your PR has followed all the “contributing guidelines” usually mentioned in the project. ● After this is done, your PR will be merged into the required branch of the project by the maintainer. ● A PR wrongly merged can be reverted back using the “Revert” button in Github.
  • 16.
    Contribute In Hacktoberfest ❏Find the repository you want to make changes to. (Has to contain the “hacktoberfest” label in it) ❏ Find an issue you want to work on (preferably with the label “good- first-issue”) ❏ Fork the repo ❏ Clone the repo to local computer ❏ Make changes as required ❏ Commit changes ❏ Make a pull request ❏ Wait for your PR to get merged with the label “hacktoberfest- accepted”.
  • 17.
    A Note ToRemember ● While searching for an issue to solve, you will find that some of them already have assignees. This means that someone has already been assigned to solve the issue mentioned. ● If that is the case, try finding another issue which does not have any assignees and you can either ask the maintainer to assign you the task or you can make a pull request and link it to that particular issue.
  • 18.