Stating With Git to GitHub

The Link Your ClassEE308 MIEC
The Link of Requirement of This AssignmentLAB 2 Individual programing work (EE308 IEC MU 2021 Fall)
The Aim of This AssignmentGit/GitHub Using & Keywords Capturing
MU STU ID and FZU STU ID19104073_831901119

1.Git/GitHub First Using

1.1 Install Git

You can download Git from : Git Download and install it.

1.2 Start Git Bash

We use a folder with some kawaii emotions as example😋
请添加图片描述

Right click in blank space of your project root directory

在这里插入图片描述

Then you will see a window like this:

在这里插入图片描述

1.3 Initialize Project

Type command:

git init

在这里插入图片描述

1.4 Config Username and Email

git config --global user.email "12341234@mail.com"
git config --global user.name "Somebody"

😎Remember to change “12341234@123.com” and “Somebody” to your email and name😎

在这里插入图片描述

You can also check your information by

git config --list

在这里插入图片描述

1.5 Produce Key Pair

ssh-keygen -t rsa -C "your_email@youremail.com"

在这里插入图片描述

Then find “.ssh” folder in the ordered path and copy it to your project root directory

在这里插入图片描述

Open the file “id_rsa.pub” and copy all content.

(If you can not open it successfully, try to open in “Written Board”)

1.6 Set SSH keys

Login GitHub and follow the steps:

在这里插入图片描述

在这里插入图片描述

1.7 Test SSH Keys

After setting SSH keys, wait a second and type

ssh -T git@github.com

在这里插入图片描述

This message means the keys you set is useable now !

1.8 Link to Repository

1.8.1 In GitHub

Click “start a project” on your GitHub main page

在这里插入图片描述

Copy the SSH link:
(Special attention!!! SSH link !!! not HTTPS link!!!)

在这里插入图片描述

Then in Git Bash:

git remote add origin git@github.com:GitHubName/GitExample.git

“git@github.com:GitHubName/GitExample.git” is SSH link you just copied

😎Remember to change “GitHubName” and “GitExample” to yours😎

1.8.2 In Git

Add every file in the directory to project

git add .

Commit files as origin master

git commit -m "you can type remark here" -a 

在这里插入图片描述

git push -u origin master

在这里插入图片描述

Then you can see files in GitHub repository在这里插入图片描述

1.9 Git commands

Check in this site plz: Git commands

相关推荐

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
©️2022 CSDN 皮肤主题:数字20 设计师:CSDN官方博客 返回首页
评论 1

打赏作者

sazic

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值