Git
安装
使用
初始化仓库
配置作者信息
子模块
实用技巧
大文件存储git-lfs
github代理
http代理
ssh代理
将多次提交进行合并
撤销已提交的改动
撤销未add的改动
撤销已add但未commit的改动
最后更新于
最后更新于
git initgit config user.username {{ 用户名 }}
git config user.email {{ 邮箱 }}[user]
name = {{ 用户名 }}
email = {{ 邮箱 }} git commit -s --amend --reset-authorgit submodule add <项目地址> <目标路径>export http_proxy=http://{{ http代理服务地址 }}:{{ http代理服务端口 }}
export https_proxy=http://{{ http代理服务地址 }}:{{ http代理服务端口 }}git config --global http.proxy 'socks5://127.0.0.1:1081'
git config --global https.proxy 'socks5://127.0.0.1:1081'[http]
proxy = socks5://127.0.0.1:1081
[https]
proxy = socks5://127.0.0.1:1081yum install nc -yHost github.com
User git
Hostname github.com
Port 22
Proxycommand /usr/bin/ncat --proxy 127.0.0.1:1081 --proxy-type socks5 %h %pgit checkout -- {{ path }}git reset {{ commit_id or branch or path}}