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
    Anomaly Detection via Reverse Distillation from One-Class Embedding

    Anomaly Detection via Reverse Distillation from One-Class Embedding Implementation (Official Code ⭐️ ⭐️ ⭐️ ) Environment pytorch == 1.91 torchvision =

    73 Dec 19, 2022
    Sphinx Bootstrap Theme

    Sphinx Bootstrap Theme This Sphinx theme integrates the Bootstrap CSS / JavaScript framework with various layout options, hierarchical menu navigation

    Ryan Roemer 584 Nov 16, 2022
    Soccerdata - Efficiently scrape soccer data from various sources

    SoccerData is a collection of wrappers over soccer data from Club Elo, ESPN, FBr

    Pieter Robberechts 195 Jan 04, 2023
    Make posters from Markdown files.

    MkPosters Create posters using Markdown. Supports icons, admonitions, and LaTeX mathematics. At the moment it is restricted to the specific layout of

    Patrick Kidger 243 Dec 20, 2022
    layout-parser 3.4k Dec 30, 2022
    [Unofficial] Python PEP in EPUB format

    PEPs in EPUB format This is a unofficial repository where I stock all valid PEPs in the EPUB format. Repository Cloning git clone --recursive Mickaël Schoentgen 9 Oct 12, 2022

    Course materials and handouts for #100DaysOfCode in Python course

    #100DaysOfCode with Python course Course details page: talkpython.fm/100days Course Summary #100DaysOfCode in Python is your perfect companion to take

    Talk Python 1.9k Dec 31, 2022
    🌱 Complete API wrapper of Seedr.cc

    Python API Wrapper of Seedr.cc Table of Contents Installation How I got the API endpoints? Start Guide Getting Token Logging with Username and Passwor

    Hemanta Pokharel 43 Dec 26, 2022
    A curated list of awesome tools for Sphinx Python Documentation Generator

    Awesome Sphinx (Python Documentation Generator) A curated list of awesome extra libraries, software and resources for Sphinx (Python Documentation Gen

    Hyunjun Kim 831 Dec 27, 2022
    Assignments from Launch X's python introduction course

    Launch X - On Boarding Assignments from Launch X's Python Introduction Course Explore the docs » Report Bug · Request Feature Table of Contents About

    Javier Méndez 0 Mar 15, 2022
    Xanadu Quantum Codebook is an experimental, exercise-based introduction to quantum computing using PennyLane.

    Xanadu Quantum Codebook The Xanadu Quantum Codebook is an experimental, exercise-based introduction to quantum computing using PennyLane. This reposit

    Xanadu 43 Dec 09, 2022
    A simple tutorial to get you started with Discord and it's Python API

    Hello there Feel free to fork and star, open issues if there are typos or you have a doubt. I decided to make this post because as a newbie I never fo

    Sachit 1 Nov 01, 2021
    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
    Sphinx-performance - CLI tool to measure the build time of different, free configurable Sphinx-Projects

    CLI tool to measure the build time of different, free configurable Sphinx-Projec

    useblocks 11 Nov 25, 2022
    Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a livereload enabled web server.

    sphinx-autobuild Rebuild Sphinx documentation on changes, with live-reload in the browser. Installation sphinx-autobuild is available on PyPI. It can

    Executable Books 440 Jan 06, 2023
    Proyecto - Desgaste y rendimiento de empleados de IBM HR Analytics

    Acceder al código desde Google Colab para poder ver de manera adecuada todas las visualizaciones y poder interactuar con ellas. Links de acceso: Noteb

    1 Jan 31, 2022
    BakTst_Org is a backtesting system for quantitative transactions.

    BakTst_Org 中文reademe:传送门 Introduction: BakTst_Org is a prototype of the backtesting system used for BTC quantitative trading. This readme is mainly di

    18 May 08, 2021
    🐱‍🏍 A curated list of awesome things related to Hugo themes.

    awesome-hugo-themes Automated deployment @ 2021-10-12 06:24:07 Asia/Shanghai &sorted=updated Theme Author License GitHub Stars Updated Blonde wamo MIT

    13 Dec 12, 2022
    Automatic links from code examples to reference documentation

    sphinx-codeautolink Automatic links from Python code examples to reference documentation at the flick of a switch! sphinx-codeautolink analyses the co

    Felix Hildén 41 Dec 17, 2022
    Loudchecker - Python script to check files for earrape

    loudchecker python script to check files for earrape automatically installs depe

    1 Jan 22, 2022