git分布式管理工具使用

git分布式管理工具使用

创建一个git仓库

git init

git add (.) 提交到暂存区

git commit -m <>

git log <--stat>

git diff <commit-id>

git reset --hard <commit-id>

git checkout <commit-id>

git branch

git checkout -b develop

$master git merge develop

git config

修改某些属性

git config --global <properity> <value>

eg:

1
2
3
4
5
6
7
git config --global user.name

git config --global user.email

git config --global http.sslverify false 关闭验证ssl证书

git config --global http.sslBackend schannel 

查看属性

git config --list --show-origin

git clone

携带参数

eg: git -c http.sslVerify=false clone <URL>

本地仓库和远程仓库绑定(远程分支)

git remote remove origin

git remote add origin "https://github.com/LosLiSang/loslisang.github.io.git"

参考

迷途小书童的Note迷途小书童的Note (xugaoxiang.com)

Licensed under CC BY-NC-SA 4.0
Last updated on Jan 11, 2024 00:00 UTC
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy