Skip to content

Introduction to Git & GitHub Make your first PR request! And enter the world of Open Source Contributions

Notifications You must be signed in to change notification settings

GDG-on-Campus-AdtU-auto/Intro-to-github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

153 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GDSC | Assam down town University

Introduction to Git and Github

This repo is maintained for the git & github workshop
And for introducing Github workflows

First Contributions

This project aims to simplify and guide the way beginners make their first contribution. If you are looking to make your first contribution, follow the steps below.

If you're not comfortable with command line, here are tutorials using GUI tools.

fork this repository

If you don't have git on your machine, install it.

Fork this repository

Fork this repository by clicking on the fork button on the top of this page. This will create a copy of this repository in your account.

Clone the repository

clone this repository

Now clone the forked repository to your machine. Go to your GitHub account, open the forked repository, click on the code button and then click the copy to clipboard icon.

Open a terminal and run the following git command:

git clone "url you just copied"

where "url you just copied" (without the quotation marks) is the url to this repository (your fork of this project). See the previous steps to obtain the url.

copy URL to clipboard

For example:

git clone https://github.com/GDSC-AJCE/first-contribution.git

where this-is-you is your GitHub username. Here you're copying the contents of the first-contributions repository on GitHub to your computer.

Set the Origin and Upstream URL

By convention the url of the fork that you had created is called the origin and the url of the original repository is called the upstream

You need to add the origin url so that git knows where to push the changes you have made, something we will see on the later part of the tutorial. And you need to add the upstream url so that everytime the original repository is updated you can sync the changes to your fork.

You can add the origin url using the git remote add origin command.

git remote add origin <the-url-of-your-fork>

For example:

git remote add origin https://github.com/<your-github-username>/Intro-to-github

Similarly you can add the upstream url using the git remote add upstream command.

git remote add upstream <the-url-of-the-original-repository>

For example:

git remote add upstream https://github.com/GDSC-AdtU/Intro-to-github

You can check if the URL are successfully added by using the git remote -v command.

git remote -v

The output should be:

Create a branch

Change to the repository directory on your computer (if you are not already there):

cd first-contributions

Now create a branch using the git branch command:

git branch <new-branch-name>

For example:

git branch alonzo-church

Now change the head to new branch from main branch using the git checkout command:

git checkout <new-branch-name>

For example:

git checkout alonzo-church

Make necessary changes and commit those changes

Now open Contributors.md file in a text editor, add your name to it. Don't add it at the beginning or end of the file. Put it anywhere in between. Now, save the file.

git status

If you go to the project directory and execute the command git status, you'll see there are changes.

Add those changes to the branch you just created using the git add command:

git add Contributors.md

Now commit those changes using the git commit command:

git commit -m "Add your-name to Contributors list"

replacing your-name with your name.

Push changes to GitHub

Push your changes using the command git push:

git push origin -u your-branch-name

replacing your-branch-name with the name of the branch you created earlier.

If you get any errors while pushing, click here:

Submit your changes for review

If you go to your repository on GitHub, you'll see a Compare & pull request button. Click on that button.

create a pull request

Now submit the pull request.

submit pull request

Soon we'll be merging all your changes into the main branch of this project. You will get a notification email once the changes have been merged.

Contributors

Thank you to all the GDSC Members for their contribution (🤗):

Ayan Masood
Ayan Masood
Kaustav Raj Kalita
Kaustav Raj Kalita
Krishna Moni Das
Krishna Moni Das
Debarchito Nath
Debarchito Nath
Rudra Pandiya
Rudra Pandiya
 Sanjukta Das
Sanjukta Das
Pulung Brahma
Pulung Brahma
Sanchayita Sharma
Sanchayita Sharma
Abhishek Kumar Singh
Abhishek Kumar Singh
Cheangchang CH Momin
Cheangchang CH Momin
Devdeep Singha
Devdeep Singha
Samiron Lahon
Samiron Lahon
Dhritimaan Sahariah
Dhritimaan Sahariah
Binit Deb
Binit Deb
Md Sibgatullah
Md Sibgatullah
Deepayan Ghosh
Deepayan Ghosh
Karan Bharadwaj
Karan Bharadwaj
Deb Mandal
Deb Mandal
Sudipta Kumar Sarkar
Sudipta Kumar Sarkar
Bungthoi Thoidingjam
Bungthoi Thoidingjam
Pubali Saikia
Pubali Saikia
Hrishikesh Bor Saikia
Hrishikesh Bor Saikia
Preeti Senapati
Preeti Senapati
Krishna Moni Das
Briti Sonowal
Nikita Borgohain
Nikita Borgohain
Preeti Das
Preeti Das
Prasanta Das
Prasanta Das
Himraj Gogoi
Himraj Gogoi
Subhajit Roy
Subhajit Roy
Pritidipan Saha
Pritidipan Saha
Prince Ch Boro
Prince Ch Boro
Mizanul Hoque
Mizanul Hoque
Sakanipaia Lyngdoh
Sakanipaia Lyngdoh
Naipha Loham
Naipha Loham
Montu Kumar
Montu Kumar
Sahil Kumar Singh
Sahil Kumar Singh
Titoka H Aye
Titoka H Aye
Aku Sarma image
Aku Sarma
Vikash
Vikash Singh
Abhinab Nath
Abhinab Nath
Raktim
Raktim Borpatragohain

About

Introduction to Git & GitHub Make your first PR request! And enter the world of Open Source Contributions

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 39