(First of all, you must have your own Github account, because you have already registered in your freshman year, so I won’t write about it here. There are a lot of sharing online, just follow along)
Configure Git
Determine whether the computer is installed with git. Enter git in the terminal.
If not, install it through homebrew
brew install git
Configure SSH KEY
- Set username and email (used for GitHub records later)
git config --global user.name "dyx"
git config --global user.email "[email protected]"
- Create SSH KEY
ssh-keygen -t rsa -C "[email protected]"
Just press Enter all the time. If successful, the .ssh folder will be generated under ~/, go in, open id_rsa.pub, and copy the key inside
because it has been created in the freshman year, so this overwrite is overwritten.
Use the cat command to view and get the ssh key
cat .ssh/id_rsa.pub
- Log in to GitHub and enter settings
- Click on the new SSH key
title and fill in it, and copy the key from the cat command just now.
- Join successfully
- Link verification
ssh -T [email protected]
Enter the set password to see that the link is successful
Create project
- After logging in to your account, click the + sign in the upper right corner -> new repository and
fill in the content according to the prompts (note: private projects need to be charged, so they can be created as public)
- Created successfully
Fork project
(Fork refers to copying someone else’s project to your own warehouse)
fork operation
fork someone else’s project
-
Find the item you want to fork and click the fork button
-
success
Delete item
- Click on the avatar in the upper right corner and select your repository
- Click to enter the item to be deleted
- Click setting
- Scroll down to the bottom and click delete this repository
- Enter again to confirm successful deletion
Clone project to local
- Create a repository
- Clone project to local, first copy ssh address
- Clone the project to local
- First, switch the terminal to the directory where you want to store the project (switch to the desktop here), then clone the project, and enter the terminal
cd /Desktop
git clone [email protected]:yixinDu/Lanqiao.git
- If you have a GitHub client, you can click on Desktop directly
- Project saved successfully