一些常用简单命令
查看仓库状态git status
初始化Git仓库git init
将文件添加到Git仓库git add
可以加.
来表示整个文件夹内所有文件
记录包括当前暂存区内容和给定日志的新提交git commit -m 'message'
创建分支git branch 'branch'
-d
符号删除branch
切入分支git checkout 'branch'
合并branchgit merge 'branch'
合并入当前指向的'branch'
添加标签git tag 'tag'
添加远程仓库git remote add '仓库名' 'url'
同步远程仓库git pull 'repository' 'branch'
下行git push 'repository' 'branch'
上行
显示commit历史git log
修改刚刚的commitgit commit --amend
强制版本覆盖git fetch --all
git reset --hard main
设置代理git config --global http.proxy 127.0.0.1:xxxx
git config --global https.proxy 127.0.0.1:xxxx
查看代理
参数--get
取消代理
参数--unset
设置config
--list
user.name
user.email
评论区(暂无评论)