sagar-subedi / 2023-summer

The central repository for submissions from 2023-gajabaar that can be public

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tasks Schedule

  • latest: 1.gwitter
  • /setup
  • /acceptance

Contributing

This document describes the workflow for submissions from 2023-gajabaar that can be public. We highly recommend you go through the document before contribution.

Note : Regarding the organization of files, each contributor will create their own folder with their own name/handle (which is consistent with other places in the program.) All work by one contributor will reside in that folder.

Note : While working with github from the command line it is best to setup SSH Keys (this will save you a lot of hassle).

Setting up your own copy of the repository

  1. Fork the repo on GitHub to your personal account. Click the Fork button on the gajabaar / 2023-summer Public page. (this needs to be done only once.)

fork screenshot

  1. Clone the repository. Click the green "Clone or download" button ①, and copy the repository's URL ② and

    type git clone repo-url in terminal

fork screenshot

Adding Changes

Before you make any changes, you should make a branch. Remember to never commit to main. The command git status will tell you what branch you are on. Customizing your terminal to show your git branch makes it easier to keep track of branch.

  1. Update main. Before you make any changes, first checkout main
git checkout main

and pull latest changes

git pull
  1. If it is the first time Create a new branch, or switch to your branch. After cloning the repository, create a new branch. We will follow a structure in which each contributor contributes to his/her own branch. For example I will create a branch named suresh

    • You can create a new branch as,
    git checkout -b <branch-name>
    # example: to do the acceptance assignment
    git checkout -b susheelthapa/acceptance
    • If the branch exists
    git checkout <branch-name>
  2. Make your changes and commit them. Once you have created your branch, make your changes and commit them. Remember to keep your commits atomic, that is, each commit should represent a single unit of change. Also, remember to write helpful commit messages, so that someone can understand what the commit does just from reading the message without having to read the diff.

For example, at the command line, this might look like

git add filename [filename ...]
git commit -m "descriptive message of what you did"
  1. Push up your changes. Push your changes to your fork. Do this by running
git push origin branch-name
  1. Make a pull request. If you then go to your fork on GitHub, you should see a button to create a pull request from your branch.

fork screenshot

  1. Once doing this, you will be presented with a page. This page will show you the diff of the changes. Double check them to make sure you are making a pull request against the right branch.

    • Enter a descriptive title in the title field. This is very important, as it is what will show up in the pull request listing and in email notifications to the people in the repo. Pull requests with undescriptive titles are more likely to be passed by.
    fork screenshot
  2. Pushing additional changes. Once you have created the pull request, it will likely be reviewed and some additional fixes will be necessary. Do not create a new pull request. Rather, simply make more commits to your branch and push them up as in steps 3 and 4. They will be added to the pull request automatically.

Once the pull request has been reviewed successfully, someone with push access to the main repository will merge it in.

About

The central repository for submissions from 2023-gajabaar that can be public

License:MIT License


Languages

Language:Python 35.0%Language:C++ 33.5%Language:JavaScript 11.2%Language:Go 9.3%Language:TypeScript 4.3%Language:Dart 3.4%Language:Rust 3.3%