Github Project S
Github Project S
NIIT PROJECT
Documentation
COURSE: GITHUB
BY: AKINMULERO PRIESTLY
PROJECT TOPIC: DOCUMENTATION ON GIT AND GITHUB
Configuring Git
Creating a Repository
The Git Workflow
Saving Changes
Inspecting a Repository
3. Branching in Git
Creating Branches
Checking out Branches
Merging Branches
Differences Between Branches
Deleting Branches
4. Git Commands
Git init
Git status
Git add
Git commit
Git push
5. What is GitHub?
Version Control
Repositories
Collaboration
Issues and Bug Tracking
Branching and Merging
Pull Requests (PRs)
Continuous Integration (CI) and Continuous Deployment (CD)
Wiki and Documentation
Security and Access Control
Community and Social Features
Licensing and Legal Considerations
GitHub Desktop and Mobile Apps
Identifying the Need for Version Control
Local Version Control System
Local version control systems are the simplest form of version
control, typically used in a single-user environment. Developers
manually track changes to files, often creating backup copies or
renaming files to indicate different versions. While
straightforward, it lacks collaboration features and can lead to
confusion and errors.
Creating a Repository
A Git repository stores project files and version history. You can
initialize a new repository or clone an existing one from a
remote source (like GitHub). Creating a repository is the first
step in tracking changes to your project.
The Workflow
Understanding the basic Git workflow is crucial for effective
version control. It involves stages like staging changes (using 'git
add'), committing changes (using 'git commit'), and pushing
changes to a remote repository (using 'git push'). This workflow
helps you track your project's history and collaborate with
others.
Saving the Changes
When making changes to your project, commit those changes.
Commits are like snapshots of your project at a specific point in
time and should include meaningful commit messages
describing the changes.
Inspecting a Repository
Git provides tools for inspecting a repository's history and
changes. You can view the commit history (using 'git log') and
see differences between versions (using 'git diff'). These tools
help you understand your project's evolution and troubleshoot
issues.
Branching in Git
Creating Branches
Branching in Git allows you to work on different aspects of your
project simultaneously. Create separate branches for specific
tasks or features to prevent conflicts and organize project
management.
Checking out Branches
Checking out branches allows you to switch between different
branches in your Git repository, focusing on one task at a time.
Use the 'git checkout' command for this purpose.
Merging Branches
After completing work on a branch, merge it back into the main
branch (usually 'master' or 'main'). Merging combines changes
made in the feature branch with the main branch but can lead
to merge conflicts that need resolution.
Deleting Branches
As your project progresses, some branches may no longer be
needed. Deleting branches that have served their purpose
keeps the repository clean and manageable, following best
practices for branch management.
Git Commands
git init: Initialize a Git repository in your project.
git status: Check if files in your project are tracked.
git add: Add untracked files to be pushed.
git add "name": Add a specific file.
git add .: Add every file in a folder.
git add -A: Add only untracked files.
git commit: Send added files to a staging area with a commit
message.
git push: Send data to your remote repository.
What is GitHub?
GitHub is a web-based platform for software development and
collaboration. It's widely used for version control, project
management, and team collaboration. Here are the steps in
pushing a project to a GitHub repository: