8 - 11 - Introduction To Github
8 - 11 - Introduction To Github
8 - 11 - Introduction To Github
Collaboration and version control are important for software development. GitHub has become an
important platform for developers, enabling seamless teamwork and efficient project management.
A system called version control, sometimes referred to as source control or revision control,
keeps track of changes made to a file or group of files over time so that you may retrieve
particular versions at a later time.
Although it can be applied to any circumstance where several versions of something are
made and may need to be monitored and recalled, it is most frequently employed in
software development.
What is GitHub?
GitHub is a web-based platform that uses Git, a version control system, to help developers
manage and track changes in their code.
It allows multiple people to collaborate on a project, track revisions, and contribute to code
from anywhere in the world.
GitHub offers both free and paid plans, catering to individuals and large organizations.
1. Version Control: GitHub’s core functionality is based on Git, which allows you to keep track of
changes in your code over time. This means you can always revert to a previous version if something
goes wrong, compare different versions, and understand the history of your project.
2. Repositories: A repository (or repo) is a central place where all the files for a project are stored.
Each repository can hold multiple files and folders, and it tracks the history of every change made.
Repositories can be public (accessible to everyone) or private (restricted access).
3. Branches: Branches are a crucial feature in GitHub that enable parallel development. You can
create a branch to work on a new feature or fix a bug without affecting the main codebase. Once
your changes are ready, you can merge the branch back into the main branch.
4. Pull Requests: Pull requests are a way to propose changes to a repository. When you submit a pull
request, you’re asking the project maintainers to review and merge your changes into the main
codebase. This feature promotes collaboration and ensures code quality through peer review.
5. Issues and Project Management: GitHub provides tools to track bugs, enhancements, and other
tasks through the Issues feature. You can create issues, assign them to team members, and track
their progress. GitHub also offers project boards for more advanced project management.
6. Actions and Automation: GitHub Actions allow you to automate workflows, such as running tests
or deploying code, directly from your repository. This feature enhances productivity and ensures
consistency across development processes.
Getting Started with GitHub
Step 1: Go to github.com and enter the required user credentials asked on the site and then click on
the SignUp for GitHub button.
2. Creating a Repository
Step 1: Then Click on Finish Sign Up. The account has been created. The user is automatically
redirected to your Dashboard.
3. To create a new repository on GitHub, follow these steps:
First, you have to create a file where your code will be stored on
your pc. For that, you have to create a file on your desktop. After
that open Git Bash and type cd <File directory> to go to file and
branch.
After making code changes you have to add the files for that you
have to check which files are not added. For that use git status.
The command git status can show you the status of your current
file whether it is added or committed or pushed.
When you get to know which files are not added by typing git
status(red-colored files are not added). Then type git add <file
name> to add files.
After that, you have to commit those added files (type git status
to check status, and green colored files are not yet committed).
Type git commit -m <message> (message is nothing but a text
that tells about what is changed in files) (there are many types of
commit command you can check out git documentation in git
official website).
At last, you have to push your code changes in your local repo by
typing git push and then make a pull request.
1. git init
2. git clone
3. git add
4. git commit
5. git status
git status
6. git push
7. git pull
8. git branch
9. git checkout
The reputed and dream job companies of all the geeks like Microsoft, Google, Facebook, Twitter,
LinkedIn, and Netflix make use of GIT.
Open source projects like Ruby On Rails, jQuery, Perl, Debian, the Linux Kernel, and many more make
use of git.