step by step guide for beginners for getting started with open source

Overview

Step-by-Step Guide for beginners for getting started with Open-Source

Here The Contribution Begins 💻

If you are a beginner then this repository is for you. By this tutorial you are going to learn how to make your First Pull Request for sure.

👋 Join our discord community CodeSmashers

STAR THIS REPOSITORY THIS WILL PAY OFF MY WORK


1. The first thing you need is Git installed on your system, if it is not installed then download it as per your OS and install it.

Git Setup :-

  • Download Git as per your OS.
  • Git installation Video as per your OS.
  • Install Git
  • Open the Git Bash ( Right Click )
  • Run the Commands
  • $ git config --global user.name "Your Name"

    $ git config --global user.email [email protected]

    $ git config --list

  • You should be able to see your entered name and email under user.name & user.email


2. You should have an account on GitHub if you you dont't have an account then simply make it.

3. You will need a text editor accoring to your comfort , I prefer Vs code

4. Now you just have to setup the project from GitHub to your local system.

Setting Project on your Local System :-


  • Fork this Repository or Project
  • This will create a copy of this repository in your account.


  • Copy the link of the Repository



  • Open Git bash where you want to clone the project and clone it
  • Clone it
  • Run Command and Hit Enter
    git clone 
         
    
         



    In this case it is
    git clone https://github.com/arpit456jain/Getting-Started-with-open-source.git

  • After you hit enter you will notice that some downloading will start. It's actually cloning of repo form your GitHub repository to your local system.

  • After this you will notice a folder is created with the name of repository



  • Then just close the Git bash and open this folder and open VS code here



5. Now Make necessary changes and commit them , lets say you have to add your name in readme , you already set up the project in local system . Now before starting your work always rembember to pull latest change from the main Repo.

  • Fetch And Merge


  • Pull these changes in your local system
  • git pull origin master
    



  • make a new branch and then make the changes , then commit them. make sure to commit to the new branch
    Never commit in master branch
  • git checkout -b new_branch_name
    git add -A
    git commit -a -m "message"
    
  • After commiting your changes on your local host you have to push that changes to GitHub , make sure you push the new branch
  • git push origin new_branch_name
    

6. Make the Pull Request

  • when you push the changes you will notice a new branch will be created on GitHub and there will be a green button for creating pull request. Click on it.



  • After this a new page will be open like this


  • Now add a title and description of your PR and click on create pull request.

  • Congrats 🎉 your Pull Request is created




Some Common Error And Their Solutions

1. Updates were rejected or failed to push some refs.


This is most common error you will find and its pretty easy to solve .


Solution: You just have to pull latest changes to your local system first and then you can push them

git pull origin master

Note : if your repo is a forked one and its some commit behind then first fetch n merge then pull changes


Common Git Commands you should know!!!

1. Git checkout

  • You can use the checkout command to switch the branch that you are currently working on.
  • git checkout 
       
    
       

    2. Git init

  • This is the command you need to use if you want to start a new empty repository or to reinitialize an existing one in the project root. It will create a .git directory with its subdirectories.
  • git init 
       
    
       

    3. Git diff

  • You can use this command to see the unstaged changes on the current branch.
  • git diff
    
  • If you want to see the staged changes.
  • git diff --staged
    
  • Or you can compare two branches:
  • gif diff 
        
        
    
        
       

    4. Git add

  • This is the command you need to use to stage changed files. You can stage individual files.
  • git add 
       
    
       
  • You can also stage all files.
  • git add .
    

    5. Git branch

  • Using git branch will list all the branches of the repository.
  • git branch
    
  • Or you can use it to create a new branch, without checking it out.
  • git branch 
       
    
       
  • To delete a branch.
  • git branch -d 
       
    
       

    6. Git log

  • If you want to see what you have committed till now.
  • git log
    
  • If you want to see last 5 commits among 100000 commits.
  • git log -p -1
    

    7. Git clear

  • To clean git bash.
  • git clear
    

    What if I have Merge Conflicts?

    A GitHub conflict is when people make changes to the same area or line in a file. This must be fixed before it is merged in order to prevent collision in the main branch.


    Now just make a Pull Request and add your name in Read me file.

    CodeSmashers Community


    Arpit Jain


    Ankita Puri

    Contributors

    Thanks go to these Wonderful People 👨🏻‍💻: 🚀


    Contributions of any kind are welcome!

    Open Source Programs click here

    show some ❤️   by giving the star to this repo

    Owner
    Arpit Jain
    Full Stack Web Developer with Python Flask and Django. 3 star Competitive Programmer on Codechef.
    Arpit Jain
    This is a small project written to help build documentation for projects in less time.

    Documentation-Builder This is a small project written to help build documentation for projects in less time. About This project builds documentation f

    Tom Jebbo 2 Jan 17, 2022
    This is the repository that includes the code material for the ESweek 2021 for the Education Class Lecture A3 "Learn to Drive (and Race!) Autonomous Vehicles"

    ESweek2021_educationclassA3 This is the repository that includes the code material for the ESweek 2021 for the Education Class Lecture A3 "Learn to Dr

    F1TENTH Autonomous Racing Community 29 Dec 06, 2022
    python package sphinx template

    python-package-sphinx-template python-package-sphinx-template

    Soumil Nitin Shah 2 Dec 26, 2022
    ReStructuredText and Sphinx bridge to Doxygen

    Breathe Packagers: PGP signing key changes for Breathe = v4.23.0. https://github.com/michaeljones/breathe/issues/591 This is an extension to reStruct

    Michael Jones 643 Dec 31, 2022
    Collection of Summer 2022 tech internships!

    Collection of Summer 2022 tech internships!

    Pitt Computer Science Club (CSC) 15.6k Jan 03, 2023
    OpenAPI (f.k.a Swagger) Specification code generator. Supports C#, PowerShell, Go, Java, Node.js, TypeScript, Python

    AutoRest The AutoRest tool generates client libraries for accessing RESTful web services. Input to AutoRest is a spec that describes the REST API usin

    Microsoft Azure 4.1k Jan 06, 2023
    AiiDA plugin for the HyperQueue metascheduler.

    aiida-hyperqueue WARNING: This plugin is still in heavy development. Expect bugs to pop up and the API to change. AiiDA plugin for the HyperQueue meta

    AiiDA team 3 Jun 19, 2022
    Portfolio project for Code Institute Full Stack software development course.

    Comic Sales tracker This project is the third milestone project for the Code Institute Diploma in Full Stack Software Development. You can see the fin

    1 Jan 10, 2022
    Generate a backend and frontend stack using Python and json-ld, including interactive API documentation.

    d4 - Base Project Generator Generate a backend and frontend stack using Python and json-ld, including interactive API documentation. d4? What is d4 fo

    Markus Leist 3 May 03, 2022
    OpenTelemetry Python API and SDK

    Getting Started • API Documentation • Getting In Touch (GitHub Discussions) Contributing • Examples OpenTelemetry Python This page describes the Pytho

    OpenTelemetry - CNCF 1.1k Jan 08, 2023
    Swagger Documentation Generator for Django REST Framework: deprecated

    Django REST Swagger: deprecated (2019-06-04) This project is no longer being maintained. Please consider drf-yasg as an alternative/successor. I haven

    Marc Gibbons 2.6k Jan 03, 2023
    Yet Another MkDocs Parser

    yamp Motivation You want to document your project. You make an effort and write docstrings. You try Sphinx. You think it sucks and it's slow -- I did.

    Max Halford 10 May 20, 2022
    Code and pre-trained models for "ReasonBert: Pre-trained to Reason with Distant Supervision", EMNLP'2021

    ReasonBERT Code and pre-trained models for ReasonBert: Pre-trained to Reason with Distant Supervision, EMNLP'2021 Pretrained Models The pretrained mod

    SunLab-OSU 29 Dec 19, 2022
    Course Materials for Math 340

    UBC Math 340 Materials This repository aims to be the one repository for which you can find everything you about Math 340. Lecture Notes Lecture Notes

    2 Nov 25, 2021
    A Python library that simplifies the extraction of datasets from XML content.

    xmldataset: simple xml parsing 🗃️ XML Dataset: simple xml parsing Documentation: https://xmldataset.readthedocs.io A Python library that simplifies t

    James Spurin 75 Dec 30, 2022
    Generate a single PDF file from MkDocs repository.

    PDF Generate Plugin for MkDocs This plugin will generate a single PDF file from your MkDocs repository. This plugin is inspired by MkDocs PDF Export P

    198 Jan 03, 2023
    Python document object mapper (load python object from JSON and vice-versa)

    lupin is a Python JSON object mapper lupin is meant to help in serializing python objects to JSON and unserializing JSON data to python objects. Insta

    Aurélien Amilin 24 Nov 09, 2022
    Openapi-core is a Python library that adds client-side and server-side support for the OpenAPI Specification v3.

    Openapi-core is a Python library that adds client-side and server-side support for the OpenAPI Specification v3.

    A 186 Dec 30, 2022
    Pydocstringformatter - A tool to automatically format Python docstrings that tries to follow recommendations from PEP 8 and PEP 257.

    Pydocstringformatter A tool to automatically format Python docstrings that tries to follow recommendations from PEP 8 and PEP 257. See What it does fo

    Daniël van Noord 31 Dec 29, 2022
    A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)..

    apispec A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification). Features Supports th

    marshmallow-code 1k Jan 01, 2023