0% found this document useful (0 votes)
15 views3 pages

GitHub Repository Creation Guide

GitHub is a code hosting platform that allows users to collaborate on code projects and track versions using Git. Git is a version control system that tracks source code history, while GitHub is a cloud service that hosts Git repositories. Users can create repositories to store and manage related files, then collaborate by committing changes.

Uploaded by

Saju George
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views3 pages

GitHub Repository Creation Guide

GitHub is a code hosting platform that allows users to collaborate on code projects and track versions using Git. Git is a version control system that tracks source code history, while GitHub is a cloud service that hosts Git repositories. Users can create repositories to store and manage related files, then collaborate by committing changes.

Uploaded by

Saju George
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

GitHub

● Its a code hosting platform for version control and collaboration


● Make easy to contribute to our open source projects

Git and GitHub

● Git is a version control system that lets you manage and keep
track our source code history
● GItHub is a cloud based hosting service that lets manage Git
repositories

Repository

● Repository is the folder inside a project

Creating a Repository

● Select the dropdown menu in the corner of our GitHub page


● Select New repository
● Type Repository name
● Optionally,type description
● Select private or public
● Initialize repository (Skip when you are importing an existing repository)
● Click create repository

Creating new file

➔ Creating file in GitHub


● Select our main page of repository
● Use ‘add file’ dropdown then click create new file
● Type file name and click ‘commit new file’
Add a file into repository

➔ Using GitHub
● Use ‘add file’ dropdown and select upload file
● Then click ‘choose your files’
● Select the file that we have and the file moved into our
repository
● Click ‘commit changes’

➔ Using Terminal

● Select the folder until get the desired destination


cd folder name

● Initialize git
git init

● Files are add into the repository


git add . (add all files in your folder)
git add <file name> (add file that you specified)

● Commit the added files to repository


git commit -m “write a message”

● Create a branch name


git branch -M <branch name>

● Add remote repository


git remote add origin <link of your repository>

● Push added files into the repository


git push -u origin <branch name>

● Then type username and password then enter


● The selected file added in our repository
Other GitHub commands used in terminal

● git status - shows the current state of directory


● git --version - see the version of initialized git
● git clone - used to create a copy of specific repository at another
location

You might also like