Muhammad Sohail
sohail0992 msohailse
Web Engineer /
DevOps
Open Source / Version
Control / Git
Agenda
● What is Open Source?
● Why Open Source?
● Collaboration Platforms.
● Why we use version control?
● Explore Github/bitbucket.
● Activity.
What you will learn?
● Find the right Repository/project to work on.
● Difference between local and remote repository.
● Basic understanding of git version control.
Goals to Achieve
● Prerequisites.
● Your First commit.
What is Open Source?
● Publicly accessible.
● Collaborative.
● Peer Review.
Why Open Source?
● Save time.
● Give back to the community.
How to Contribute
- Label: help wanted
- is:issue is:open label:beginner
- is:issue is:open label:easy
- is:issue is:open label:first-timers-only
- is:issue is:open label:good-first-bug
- is:issue is:open label:"good first issue"
- is:issue is:open label:starter
- is:issue is:open label:up-for-grabs
- is:issue is:open label:easy-fix
- is:issue is:open label:"beginner friendly"
- is:issue is:open label:your-first-pr
https://www.freecodecamp.org/news/how-to-contribute-to-open-source-projects-beginners-guide/
https://github.com/gayanvoice/top-github-users/blob/main/markdown/total_contributions/pakistan.md
Collaboration Platforms
● GitHub
● BitBucket
● GitLab
● Launchpad
● SourceForge
● Beanstalk
● Apache Allura
● Git Kraken
● Git client
● Gitea
● Git Bucket
Version Control
● Git
● SVN
● TFS
● VSTS
● IBM Rational ClearCase
● Revision Control System
● Visual SourceSafe(VSS)
● PVCS
● Darcs
https://www.softwaretestinghelp.com/version-control-software/
Distributed Version Control System (DVCS)
- Each user
- has its own copy (Decentralized)
- Can work offline
- Git is a distributed version control system.
Distributed Version Control System (DVCS)
Git
Git is a free and open source distributed version control system designed to handle
everything from small to very large projects with speed and efficiency.
• https://git-scm.com/downloads
Git Initialize
● git init
Git Add
- git add [.] [file/folder Name]
- git-add - Add file contents to the index
https://git-scm.com/docs/git-add
Git Status
- git status
Diff
- git diff
Git commit
- git commit [-m] [-am] [--noverify] [--amend]
Good Commit Message
● Good commit message.
● Encapsulate one logical idea.
● Doesn’t introduce breaking changes.
● Associating code with an issue or ticket.
Git Remote
- git remote [--verbose | -v] [add]
Git Clone
- git clone [url]
Git branching
B
C
A
branch 1
branch 2
Merge
- git checkout -b new-row
- git commit -am ‘added td with sohail info to the table ’
- git checkout main
- git merge new-row
Git Merge
Cheat Sheet
References
● Redhat
● Just For Fun by Linus Torvalds
● What the Tech Industry Has Learned from Linus Torvalds: Jim Zemlin at
TEDxConcordiaUPortland
● Pro Git
● Console.log
● https://www.softwaretestinghelp.com/github-alternatives/
● https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud
● https://www.perforce.com/blog/vcs/what-dvcs-anyway
● https://github.com/gayanvoice/top-github-
users/blob/main/markdown/total_contributions/pakistan.md
Open Source_Git.pptx

Open Source_Git.pptx

  • 1.
  • 2.
    Open Source /Version Control / Git
  • 3.
    Agenda ● What isOpen Source? ● Why Open Source? ● Collaboration Platforms. ● Why we use version control? ● Explore Github/bitbucket. ● Activity.
  • 4.
    What you willlearn? ● Find the right Repository/project to work on. ● Difference between local and remote repository. ● Basic understanding of git version control.
  • 5.
    Goals to Achieve ●Prerequisites. ● Your First commit.
  • 6.
    What is OpenSource? ● Publicly accessible. ● Collaborative. ● Peer Review.
  • 7.
    Why Open Source? ●Save time. ● Give back to the community.
  • 8.
    How to Contribute -Label: help wanted - is:issue is:open label:beginner - is:issue is:open label:easy - is:issue is:open label:first-timers-only - is:issue is:open label:good-first-bug - is:issue is:open label:"good first issue" - is:issue is:open label:starter - is:issue is:open label:up-for-grabs - is:issue is:open label:easy-fix - is:issue is:open label:"beginner friendly" - is:issue is:open label:your-first-pr https://www.freecodecamp.org/news/how-to-contribute-to-open-source-projects-beginners-guide/ https://github.com/gayanvoice/top-github-users/blob/main/markdown/total_contributions/pakistan.md
  • 9.
    Collaboration Platforms ● GitHub ●BitBucket ● GitLab ● Launchpad ● SourceForge ● Beanstalk ● Apache Allura ● Git Kraken ● Git client ● Gitea ● Git Bucket
  • 10.
    Version Control ● Git ●SVN ● TFS ● VSTS ● IBM Rational ClearCase ● Revision Control System ● Visual SourceSafe(VSS) ● PVCS ● Darcs https://www.softwaretestinghelp.com/version-control-software/
  • 11.
    Distributed Version ControlSystem (DVCS) - Each user - has its own copy (Decentralized) - Can work offline - Git is a distributed version control system.
  • 12.
  • 13.
    Git Git is afree and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. • https://git-scm.com/downloads
  • 14.
  • 15.
    Git Add - gitadd [.] [file/folder Name] - git-add - Add file contents to the index https://git-scm.com/docs/git-add
  • 16.
  • 17.
  • 18.
    Git commit - gitcommit [-m] [-am] [--noverify] [--amend]
  • 19.
    Good Commit Message ●Good commit message. ● Encapsulate one logical idea. ● Doesn’t introduce breaking changes. ● Associating code with an issue or ticket.
  • 20.
    Git Remote - gitremote [--verbose | -v] [add]
  • 21.
    Git Clone - gitclone [url]
  • 22.
  • 23.
    Merge - git checkout-b new-row - git commit -am ‘added td with sohail info to the table ’ - git checkout main - git merge new-row
  • 24.
  • 25.
  • 26.
    References ● Redhat ● JustFor Fun by Linus Torvalds ● What the Tech Industry Has Learned from Linus Torvalds: Jim Zemlin at TEDxConcordiaUPortland ● Pro Git ● Console.log ● https://www.softwaretestinghelp.com/github-alternatives/ ● https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud ● https://www.perforce.com/blog/vcs/what-dvcs-anyway ● https://github.com/gayanvoice/top-github- users/blob/main/markdown/total_contributions/pakistan.md