GITHUB
GITHUB
GITHUB
Linus Benedict torvalds
• Till 2005, (then) proprietary service BitKeeper was used for Linux kernel development. When
Bitkeeper shut down its free service, Linus Torvalds created Git on his own because none of the
other version control systems met his needs.
⚬
GITHUB
⚬
⚬
What is
GitHub?
• GitHub is a collaboration platform built on top of a distributed version
control system called Git. One does not have to worry about losing data
on his hard drive or managing a project across multiple computers -
one can sync from anywhere. You can track issues, build & test the
things and finally deploy.
Why Use of GitHub for Projects?
• Version Control (Allows experiments and mistakes without messing up
in final product)
• Keep your Code in One Place
• Great Collaboration Platform
• Git, GitHub, GitHub.com, GitHub Desktop,
• Key Terms:Repository: Storage space for projects (local or remote).
• Commit: Snapshot of changes with a unique identifier.
• Branch: Parallel version for divergent development.
• Merge: Combining changes from different branche
Repository:
Display images of local and remote repositories.
Commit:
Diagram showing a commit with changes and its unique identifier.
Branch:
Illustration of the main branch and a feature branch diverging.
Steps to Install Git
• Subtitle: Installation Process
• Step 1: Download Git
⚬ Provide the URL for the official Git website (https://git-scm.com/).
⚬ Include a screenshot of the website or the download page.
• Step 2: Run the Installer
⚬ Explain the installation process on different operating systems
(Windows, macOS, Linux).
⚬ Include visuals of the installation wizard or command line.
• Step 3: Configuration (Optional)
⚬ Mention that configuration steps can be done during installation or
later.
⚬ Briefly touch on setting up user information and default text editor.
Steps to Install GitHub Desktop
Check Installation:
• Open your command line interface or terminal.
• Type git --version and press enter.
• You should see information about the installed Git version.
Check Configuration:
• Type git config --list to see your Git configuration settings.
• Verify that your user information is correctly configured.
CONFIGURINGGIT
InthecontextofGit,"configuration" referstothesettings
andpreferences thatdeterminehowGitbehavesonyour
system.Gitconfiguration involvescustomizingvarious
aspectsoftheversioncontrolsystemtosuityourneeds.
Thisconfiguration isstoredinthreelevels:system,global,
andlocal.
SystemConfiguration: GlobalConfiguration: LocalConfiguration:
Thislevelisrepository-specific
This level applies system- Thislevelisspecifictoauserand
andonlyappliestothecurrent
wide and affects all users on appliestoallrepositoriesforthat Gitrepository.Local
the machine. It is user.It'stheplacewhere configurationsoverrideglobal
typicallyusedforsettingsthat youmightsetyourusernameandemail,which
configurationsforthatspecific
shouldareusedtoidentifyyour repository.
commits. git config --global user.name "Your Name" git gitconfiguser.name"YourName"git
bethesameforallusers. configuser.email
"your.email@example.com" "your.email@example.com"
git config --system core.editor
"nano" ᶜᵒⁿᶠᶦᵍ ⁻⁻ᵍˡᵒᵇᵃˡ ᵘˢᵉʳ.ᵉᵐᵃᶦˡ
Configuring Git is important because it allows you to personalize your Git
environment and ensure that your actions, such as commits, are
associated with the correct identity. It also allows you to set preferences
for the Git command-line interface, such as the default text editor, merge
tools, and more.
You can view your Git configuration at any level using the git config command without
anyarguments.Forexample:
git config --global --list
CREATINGGITHUBREPOSITORY
To initiate a new Git repository, we use the command “git init”. git init
it initializes version control in your project.
When we run “git init”, Git creates a hidden folder called .git in our project's
directory.
It stores all the information needed to track changes, manage versions,
and
collaborate effectively.
This .gitfolder iswhat makesyour projectofficiallyaGit repository.
Create a pull request to propose and collaborate on changes to a repository. These
changes are proposed in a branch, which ensures that the default branch only
contains finished and approved work.
It enables developers to propose changes to a project, review those changes, and
integrate them into the main codebase.
You can create pull requests on GitHub.com, with GitHub Desktop, in GitHub
Codespaces, on GitHub Mobile, and when using GitHub CLI.
A pull request is initiated from the branch to the original project's repository.
It is a request to merge the changes from the branch into the main codebase.
steps involved in creating a pull request:
1.Forktherepository.
2.Clonetheforkedrepositorytoyourlocalmachine.
3. Create a new branch for your changes.
4.Makeandcommityourchangestothenewbranch.
5. Push the changes to your forked repository.
6. Open a pull request from your forked repository to the original repository.
After initializing a pull request, you'll see a review page that shows a high-level
overview of the changes between your branch (the compare branch) and the
repository's base branch. You can add a summary of the proposed changes,
review the changes made by commits, add labels, milestones, and assignees,
and @mention individual contributors or teams.
BRANCHING
Git is a distributed version control
system used to track changes in
source code.
Branching allows you to work on
different versions of your project
simultaneously.
Create a new branch: git branch branch_name
GitHub is a code hosting platform for version control and collaboration. It lets you and
others work together on projects from anywhere.
In layman language it acts as our portfolio where we can upload our work and projects
Your profile