We will learn how to create repository, pushing, cloning and creating branches. Additionally we will talk about various workflows that are used by teams while collaborating in a project.
6. Git is a software for tracking changes in any set of files(folders), usually used for coordinating
work among programmers collaborating in developing source code during software development.
GitHub is an online platform/provider of internet used for hosting software development and
version control using git.
It helps a team work on a project and track their progress by seeing changes every team
programmer/coder makes to it hence help them to work together.
Categories of Version Control System(VCS)
1. Centralized VCS - Allows team members to connect to a central server to get the latest copy
of code and commit their changes among the programmers. Examples include Subversion
and Microsoft Team foundation. Some of the disadvantages of Centralized vcs is that incase
of central failure, work can not proceed.
2. Distributed VCS - Team members have the project history locally in their machines and can
link directly to each other. Git and Mercurial are good examples of distributes VCS.
7. Advantages of Git
We are going to major on git since it is the most popular version control
system with over 70% of programmers across the globe using it.
Here is why git is the most used VCS:
It is free
It is open source
It is superfast
Scalable
Cheap branching/merging
8. HOW TO INSTALL GIT AND CREATE A GITHUB ACCOUNT
-Git supports Windows, macOS and Linux.
-To download it go to your google search bar and search for the latest git
software. From the official site of git choose the package that fits your
operating system and download it. (https://git-scm.com)
-Once you have the setup follow the installation instruction to install it to your
machine. Be sure to check the necessary and recommended git features. Take
a look at git release notes in case you get stuck during the installation process.
-If everything has worked out fine, then the software is ready for use. Once
you've done that, create a GitHub account here(https://github.com)
9. Getting started with Git
Git can be used on a command line. Modern code editors and IDEs support
git therefore they have basic git features.
Git also have Graphical User Interfaces and the most popular tools are:
//GitKracken Git GUI
//Sourcetree
--GitKraken works across different platforms such as Get Cracking Boards
for issue tracking and git cracking timelines for project timeline.
--Sourcetree on the other hand is free but only available for windows and
macOS which means Linux users will have to use another Git GUI tool.
10. HOW TO CHECK IF GIT IS INSTALLED IN YOUR COMPUTER
Open a terminal or command prompt window. If you are on mac press
command + space and type terminal. For windows users click search icon and
type cmd.
To know that git is installed type git –version.
In windows, your installer will install Git Bash application which is basically a
git command line.
12. You will need your GitHub account’s username and email during git configuration.
In configuration we have to specify a few things such as Name, Email, Default Editor and Line
ending.
The above configurations occur at different levels.
System – for all users
Global – for all repositories of the current user.
Local – for the current user.
Let’s do it practically (Open your command prompt |CMD|)
git config –global user.name “Your User Name. We are using those quotation marks because
of the spaces between the name.
git config –global user.email youremail@gmail.com
git config –global core.editor “code –wait”
git config –global –e. Will open our default editor to edit all our global settings.
13. Configure how git should handle end of lines.
In windows end of lines are marked with two special characters
r – carriage return
n – line feed
In mac end of lines are marked with line feed n.
git config –global core.autocrlf true for windows
git config –global core.autocrlf input for mac and Linux.
To get help with git configuration you can type git config on the google search bar or on
your command line type:
git config –help. Press space to go to the next page and q to quit.
git config –h for short summary.
14. CREATING REPOSITORY AND STORING OUR PROJECTS
After configuring our git we now need to create a repository in the GitHub
account and use it to store our projects. As stated earlier, a repository is a
special type of a database that keeps a projects code.
To create a repository follow the procedures stated below.
Login to GitHub with your username and password
Got to create repository
Put the repository name
If the name is checked to be available click create repository.
15. Now our repository is ready to receive a project so go to your git bash to
do it. Here is how:
• cd to your project directory.
• git init to initialize your project
• git add name of project to add your project to git
• git commit –m ‘show the progress’ to update it to git
• git remote add origin link to your repository (at this stage copy the link of
your repository from your GitHub account and paste it here)
• git push –u origin master to push your project to your GitHub account.
17. What is GitHub Desktop?
-GitHub Desktop is an application that enables you to interact
with GitHub using GUI instead of the command line or a web
browser.
-As mentioned earlier by Jared, GitHub encourages you and
your team to collaborate using best practices with Git and
GitHub. You can use GitHub Desktop to complete most Git
commands from your desktop with visual confirmation of
changes. You can push to, pull from, or clone remote
repositories with GitHub Desktop.
18. How to download and Install.
We will provide a software copy of windows operating system
laptops but before that you we can download it from
desktop.github.com.
Download and Install the software and lets get started.
After successful installation you come across the below
screenshot.
19.
20. Contributing to projects with GitHub Desktop
After installing, authenticating, and configuring
the app, you are ready to start using GitHub
Desktop. You can create, add or clone
repositories and use GitHub Desktop to manage
contributions to your repositories.
Showcasing cloning, creating, pushing and
pulling repos using GitHub Desktop
22. Date Time Session Topics
26th Sept 2021 1600hrs Info session and introduction Introducing GDSC core lead and GDSC alumni.
21st Nov 2021 1600hrs Introduction to git and GitHub Installing Git, GitHub, Cloning, Repos, Push, Pull, Using
Terminal, GitHub Desktop,
5th Dec 2021 1600hrs Introduction to UI/UX designing Installing figma /Adobe, designing, Animating
11th Dec 2021 0200hrs GDSC HIKE To be communicated(Place of Interest)
8th Jan 2022 1600hrs Cyber Security and Networking Internet, User Security, Networking
- Jan 2022 1600hrs Introduction to SQL and NOSQL
Databases
Installation, Creating, Analyzing, reading and
implementing.
22nd Jan 2022 1600hrs Introduction to API’s API’s
30th Jan 2022 1600hrs Submission of GDSC projects GDSC Mobile Apps and Web Apps