The document provides steps to install and use the version control system Git. It explains how to download and install Git, register for a GitHub account and generate an SSH key. It then describes how to register the SSH key with GitHub, create a repository, configure Git with user details, make initial commits and push code to the repository. Finally, it discusses how to collaborate with others by giving them access to repositories and pulling/pushing code changes.
9. Generating ssh key
• Open GIT bash terminal .
• Go to root directory by typing
cd~
• Type ssh-keygen.exe –t rsa –C
“mygit@gmail.com“ (email that
you have used when you register
to github.com )
• Press “Enter” whenever they ask
for passphrase
10. Generating ssh key
• Open GIT bash terminal .
• Go to root directory by typing
cd~
• Type ssh-keygen.exe –t rsa –C
“mygit@gmail.com“ (email that
you have used when you register
to github.com )
• Press “Enter” whenever they ask
for passphrase
14. Registering your ssh key to github
• Open C:Usersuser.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
15. Registering your ssh key to github
• Open C:Usersuser.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
18. Config and use
• Open Git bash terminal in the
corresponding folder
19. Config and use
• git config --global
user.name
“yourusername“
• git config --global
user.email
“youremail@email.com
"
20. Config and use
Type the following commands in the terminal
git init
git add –A
git commit -m "first commit“
git remote add origin git@github.com:faysalhossain2007/my-first-git-project.git
git push -u origin master
21. 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
22. 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
23. 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
24. 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