how to install and use git
TRANSCRIPT
![Page 1: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/1.jpg)
How to install and use git
![Page 2: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/2.jpg)
Download GIT
https://git-scm.com/download/win
Download installation file from the above link
![Page 3: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/3.jpg)
Installing GIT
![Page 4: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/4.jpg)
Installing GIT
![Page 5: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/5.jpg)
Installing GIT
![Page 6: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/6.jpg)
Installing GIT
![Page 7: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/7.jpg)
Installing GIT
![Page 9: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/9.jpg)
Generating ssh key • Open GIT bash terminal .• Go to root directory by typing
cd~• Type ssh-keygen.exe –t rsa –C
“[email protected]“ (email that you have used when you register to github.com )• Press “Enter” whenever they ask
for passphrase
![Page 10: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/10.jpg)
Generating ssh key • Open GIT bash terminal .• Go to root directory by typing
cd~• Type ssh-keygen.exe –t rsa –C
“[email protected]“ (email that you have used when you register to github.com )• Press “Enter” whenever they ask
for passphrase
![Page 11: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/11.jpg)
Registering your ssh key to github
• Go to Settings from your github account
![Page 12: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/12.jpg)
Registering your ssh key to github
• Go to SSH keys tab
![Page 13: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/13.jpg)
Registering your ssh key to github
• Press Add SSH key
![Page 14: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/14.jpg)
Registering your ssh key to github
• Open C:\Users\user\.ssh in your file explorer • Open id_rsa.pub file in
notepad• Copy the text and paste it to
the key field in github.com
![Page 15: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/15.jpg)
Registering your ssh key to github
• Open C:\Users\user\.ssh in your file explorer• Open id_rsa.pub file in
notepad• Copy the text and paste it
to the key field in github.com• Press Add key
![Page 16: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/16.jpg)
Creating a repository
• Create new repository in github.com
![Page 17: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/17.jpg)
Creating a repository
• Create new repository in github.com
![Page 18: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/18.jpg)
Config and use
• Open Git bash terminal in the corresponding folder
![Page 19: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/19.jpg)
Config and use• git config --global
user.name “yourusername“• git config --global
user.email “[email protected]"
![Page 20: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/20.jpg)
Config and useType the following commands in the terminal
git init
git add –A
git commit -m "first commit“
git remote add origin [email protected]:faysalhossain2007/my-first-git-project.git
git push -u origin master
![Page 21: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/21.jpg)
Teamwork• Give permission to your
partner in your repository so that he can update the project by pushing the latest code.• To give this permission go to
settings of your repository• Then go to Collaborators tab• Type the email or username
whom you want to give the access
![Page 22: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/22.jpg)
Teamwork• Give permission to your
partner in your repository so that he can update the project by pushing the latest code.• To give this permission go to
settings of your repository• Then go to Collaborators tab• Type the email or username
whom you want to give the access
![Page 23: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/23.jpg)
Teamwork• Give permission to your
partner in your repository so that he can update the project by pushing the latest code.• To give this permission go to
settings of your repository• Then go to Collaborators tab• Type the email or username
whom you want to give the access
![Page 24: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/24.jpg)
Teamwork• When ever you do some change in your file under the project
directory then first add it by typing : git add –A in the terminal • Then give the commit a name to identify your work by typing : git
commit –m “your message”• Push it to the github by typing : git push origin master• Your partner can have the latest updates of the project by pulling the
updated code. To do this he needs to give the following command in the terminal : git pull origin master
![Page 25: How to install and use git](https://reader035.vdocuments.net/reader035/viewer/2022062412/58768ff81a28abab2f8b55ad/html5/thumbnails/25.jpg)
That’s it