Git Product home page Git Product logo

getting-started-with-github's Introduction

Using github for Open Source Software Development

28th-Jun-2020, skillplot - mangalbhaskar

Need?

  1. Do you need to collaborate with a team or other open source projects?

  2. Do you want to publish your code for others to use and collaborate with them?

  3. Do you want to take control of your documentation content, course material, blog articles that you write once and publish anywhere?

  4. Do you want to write the book, articles, blog, course-ware, and collaborate with others?

  5. Do you want to automate the software development and content publishing?

  6. Do you want simple, less maintenance overhead and free hosting web site?

What is github?

  1. github is a Git repository hosting service, but it adds many of its own features.

  2. At the heart of github is Git, an open source project started by Linux creator Linus Torvalds. github

What is Git?

  1. version control system

  2. Git is a mature, actively maintained open source project originally developed in 2005 by Linus Torvalds, the famous creator of the Linux operating system kernel

  3. A staggering number of software projects rely on Git for version control, including commercial projects as well as open source

  4. Distributed architecture, Git is an example of a DVCS (hence, Distributed Version Control System)

Key Features?

3 Key Flagship features: Fork, pull request, merge

  • fork / forking - create a copy of a repository from other user’s account to your account

  • This enables you to take a project that you don’t have write access to and modify it under your own account

  • pull request - allows you to share the changes for the forked repo by sending the notification to the parent repo/owner

  • merge request - allows to take the change request from other users to their repo

    • Original owner of the parent repo can then, with a click of a button, merge the changes you requested from the forked repo for his original repo

Before github: if you wanted to contribute to an open source project
  • You had to manually download the project’s source code

  • Make your changes locally

  • Create a list of changes called a "patch"

  • And then e-mail the patch to the project’s maintainer

  • The maintainer would then have to evaluate this patch, possibly sent by a total stranger, and decide whether to merge the changes

  • network effect starts to play a role in github

    • When you submit a pull request, the project’s maintainer can see your profile, which includes all of your contributions on github. If your patch is accepted, you get credit on the original site, and it shows up in your profile

    • It’s like a resume that helps the maintainer determine your reputation.

    • publicly discussed.

Other Salient features and services

  • ML based code scanner, security

  • Other offers and services for individuals, organizations and enterprise

  • Individual repos

  • Organization repos

  • Private and public repos

  • Collaborators, Transfer ownerships

  • DevOps - Actions - automation, triggers

  • Content Publishing - books in markdown, asciidoc formats, LMS

  • Issue/Bug Tracker, inbuild wiki, statistics/insight - lines of code, total commits etc.

  • Static Web-site hosting directly from text files for individual or repo specific

  • Web-hooks for auto updating repo - can be used as LMS

5C’s - How Github Helps In Open Source Software Project Development

  • Contribution to the other Open source project

  • Collaboration with others for your Open source project, more than one person can be the code owner

  • Credit to individual contributors, appears on the project contributor list

  • Communication - issues, documentations, wikis, project web-site

  • Catalog - insights, stats - code frequency, traffic, contributors, commits, dependency graph, forks, network

Alternatives?

  1. bitbucket is alternative to github

  2. mercurial (hg) is alternative to git

Getting Started With github

Github documentation is the best resource to follow the instructions step-by-step: Getting Started With github. Following instructions gives you the quick summary, for details follow the github documentation.

Install git On Your System

For windows there are couple of options:
  1. Install git for windows from gitforwindows.org. This installs git and other linux like utilities, text editors. It is around ~45MB

    git --version
  2. Or, Install github desktop for windows from desktop.github.com. This installs github Desktop UI along with git. It is around ~88MB. github Desktop is only available for only for Windows and Mac OS. For Linux there are other GUI applications.

    • If you have installed git with github desktop and want git command to be accessible from the command prompt, then add the following to the windows PATH environment variable. Change the <UserName> and <Version> to the appropriate values based on your system and installation details

      C:\Users\<UserName>\AppData\Local\GitHubDesktop\app-<Version>\resources\app\git\cmd
      # once it's configured git can be accessed from command prompt
      git --version
For Ubuntu:
  1. Install using apt repository

    sudo apt install git
    git --version

Using the public github Repository

  1. Clone the public repository and start using it locally

git clone https://github.com/skillplot/getting-started-with-github.git

Create Your First Repository

Warning
Change the remote github repo url: https://github.com/skillplot/getting-started-with-github.git to your repo URL
  1. Create account / sign-up on github

  2. Create the new repo (git repo) on:

    1. Using Github desktop - create new git repo locally and publish it on github website - this is straight forward; just follow the instructions in the UI.

    2. Or, directly on github website and then create git repo locally using git command line tool and publish it on github website

How to create a new repository on the command line?
  1. Initialize the individual code repo

    echo "# getting-started-with-github" >> README.md
    git init
    git add README.md
    1. configure username and emailID

      Tip
      Use individual git repo specific configurations settings either in personal or shared systems as you may want to use different git/github accounts for different projects.
      git config user.name "yourname"
      git config user.email "[email protected]"
    2. commit the local changes, add the github remote repo URL and push the changes to the master branch

      git commit -m "first commit"
      git remote add origin https://github.com/skillplot/getting-started-with-github.git
      git push -u origin master
      Note
      Recommended to create these files at the root of the project directory: README.md, LICENSE, and .gitignore

Publish your non-version codebase to github (git repo)

  1. Change directory to the root of the project codebase directory. Initialize it as git repo, add, commit and push the changes to the github.

git init
git add -A
git commit -m"first cut files"
git remote add origin https://github.com/skillplot/getting-started-with-github.git
git push -u origin master

Misc

  • Importing old repo to new repo using github website UI, github import

  • Path environment variable on powershell: $env:PATH

Videos

getting-started-with-github's People

Contributors

mangalbhaskar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.