Git Proxy Configuration Guide

Why a proxy matters Slow or unstable networks—think corporate firewalls, cross-border latency, or flaky hotel Wi-Fi—can make cloning or fetching repositories painful. Pointing Git to an HTTP, HTTPS, or SOCKS proxy lets you reuse existing access infrastructure (jump hosts, Clash, Shadowsocks, V2Ray, enterprise proxies) and speed up operations. Enable HTTP/HTTPS proxy quickly Write the proxy endpoint directly into Git configuration: # Global (~/.gitconfig) git config --global http.proxy http://127.0.0.1:7890 git config --global https.proxy http://127.0.0.1:7890 Limit the scope to a single repository by omitting --global and running inside the repo: ...

October 10, 2025 Â· 3 min Â· 429 words

Git Collaboration Basics (2)

Rebase for clean history Interactive rebase Reorder, squash, or rewrite a range of commits: git rebase -i HEAD~5 Common directives: pick: keep the commit reword: edit the message squash: merge into the previous commit edit: pause to adjust content Resolve conflicts and continue git status # fix conflict markers <<<<<<< ======= >>>>>>> git add <resolved-file> git rebase --continue git rebase --abort Coordinate with the team Rewriting shared history requires coordination. Prefer git push --force-with-lease to avoid overwriting teammates’ work. ...

April 14, 2022 Â· 3 min Â· 445 words

Git Collaboration Basics (1)

Configure and inspect Before committing on a new machine, confirm each configuration layer and avoid stale credentials: git config --system --list git config --global --list git config --local --list git config --list --show-origin Set identity and useful aliases: git config --global user.name "Team Member" git config --global user.email "[email protected]" git config --global core.editor "code --wait" git config --global alias.st status Share ignore rules across repositories: git config --global core.excludesfile ~/.gitignore_global echo '.DS_Store' >> ~/.gitignore_global Path from working tree to commit Know how changes move between working tree, index, and repository: ...

April 13, 2022 Â· 3 min Â· 604 words