git常用命令(一)基本使用

本地库初始化(新建)

git init

设置项目级别签名

git config

设置系统用户级别签名

git config --global

例:

git config user.name godv
git config user.email [email protected]
git config --global user.name godv
git config --global user.email [email protected]

查看项目级别签名

cat .git/config

查看系统用户级别签名

cd ~
回到家目录 
ls -la
查看全部文件包括隐藏文件
cat .gitconfig

查看工作区文件状态

git status

添加至暂存区

git add xxx

从暂存区移除

git rm --cached xxx

从暂存区提交至本地库

git commit xxx
git commit -m "message" xxx
扫描二维码关注公众号,回复: 11673514 查看本文章

猜你喜欢

转载自blog.csdn.net/we1less/article/details/108182205
今日推荐