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
    Grokking the Object Oriented Design Interview

    Grokking the Object Oriented Design Interview

    Tusamma Sal Sabil 2.6k Jan 08, 2023
    Leetcode Practice

    LeetCode Practice Description This is my LeetCode Practice. Visit LeetCode Website for detailed question description. The code in this repository has

    Leo Hsieh 75 Dec 27, 2022
    This is a repository for "100 days of code challenge" projects. You can reach all projects from beginner to professional which are written in Python.

    100 Days of Code It's a challenge that aims to gain code practice and enhance programming knowledge. Day #1 Create a Band Name Generator It's actually

    SelenNB 2 May 12, 2022
    A Python Package To Generate Strong Passwords For You in Your Projects.

    shPassGenerator Version 1.0.6 Ready To Use Developed by Shervin Badanara (shervinbdndev) on Github Language and technologies used in This Project Work

    Shervin 11 Dec 19, 2022
    A document format conversion service based on Pandoc.

    reformed Document format conversion service based on Pandoc. Usage The API specification for the Reformed server is as follows: GET /api/v1/formats: L

    David Lougheed 3 Jul 18, 2022
    Pystm32ai - A Python wrapper for the stm32ai command-line tool

    PySTM32.AI A python wrapper for the stm32ai command-line tool to analyse deep le

    Thibaut Vercueil 5 Jul 28, 2022
    A tutorial for people to run synthetic data replica's from source healthcare datasets

    Synthetic-Data-Replica-for-Healthcare Description What is this? A tailored hands-on tutorial showing how to use Python to create synthetic data replic

    11 Mar 22, 2022
    Types that make coding in Python quick and safe.

    Type[T] Types that make coding in Python quick and safe. Type[T] works best with Python 3.6 or later. Prior to 3.6, object types must use comment type

    Contains 17 Aug 01, 2022
    PySpark Cheat Sheet - learn PySpark and develop apps faster

    This cheat sheet will help you learn PySpark and write PySpark apps faster. Everything in here is fully functional PySpark code you can run or adapt to your programs.

    Carter Shanklin 168 Jan 01, 2023
    Poetry plugin to export the dependencies to various formats

    Poetry export plugin This package is a plugin that allows the export of locked packages to various formats. Note: For now, only the requirements.txt f

    Poetry 90 Jan 05, 2023
    A simple USI Shogi Engine written in python using python-shogi.

    Revengeshogi My attempt at creating a USI Shogi Engine in python using python-shogi. Current State of Engine Currently only generating random moves us

    1 Jan 06, 2022
    An interview engine for businesses, interview those who are actually qualified and are worth your time!

    easyInterview V0.8B An interview engine for businesses, interview those who are actually qualified and are worth your time! Quick Overview You/the com

    Vatsal Shukla 1 Nov 19, 2021
    A simple malware that tries to explain the logic of computer viruses with Python.

    Simple-Virus-With-Python A simple malware that tries to explain the logic of computer viruses with Python. What Is The Virus ? Computer viruses are ma

    Xrypt0 6 Nov 18, 2022
    My Sublime Text theme

    rsms sublime text theme Install: cd path/to/your/sublime/packages git clone https://github.com/rsms/sublime-theme.git rsms-theme You'll also need the

    Rasmus 166 Jan 04, 2023
    Source Code for 'Practical Python Projects' (video) by Sunil Gupta

    Apress Source Code This repository accompanies %Practical Python Projects by Sunil Gupta (Apress, 2021). Download the files as a zip using the green b

    Apress 2 Jun 01, 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
    Create docsets for Dash.app-compatible API browser.

    doc2dash: Create Docsets for Dash.app and Clones doc2dash is an MIT-licensed extensible Documentation Set generator intended to be used with the Dash.

    Hynek Schlawack 498 Dec 30, 2022
    An MkDocs plugin that simplifies configuring page titles and their order

    MkDocs Awesome Pages Plugin An MkDocs plugin that simplifies configuring page titles and their order The awesome-pages plugin allows you to customize

    Lukas Geiter 282 Dec 28, 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
    MkDocs plugin for setting revision date from git per markdown file

    mkdocs-git-revision-date-plugin MkDocs plugin that displays the last revision date of the current page of the documentation based on Git. The revision

    Terry Zhao 48 Jan 06, 2023