Some Commonly Used Git Commands
2025/12/25

Some Commonly Used Git Commands

This article introduces some commonly used git commands.

Pulling code

Clone a specific branch

git clone -b drizzle https://github.com/RobinWM/shipany-template-one.git my-shipany-project

Syncing code

git clone https://github.com/RobinWM/shipany-template-one.git
git remote rm origin
git remote add upstream https://github.com/shipanyai/shipany-template-one.git
git remote add origin <your-repository-url>
git pull upstream main

Proxy

git config --global --unset http.proxy
git config --global http.proxy http://127.0.0.1:7890

Configuration

git config user.name "RobinWM"
git config user.email "v517649974769@gmail.com"

Key generation

ssh-keygen -t ed25519 -C "v517649974769@gmail.com"