初次使用Git小记
之前一直用svn,今天有个项目需要使用git,使用时遇到问题,提示没有权限。
查找其他人的经验,git clone 命令是可以带账号密码的,如下:
带密码拉取
git clone http://用户名:密码@10.0.4.55/iotpd/mpmt/hello.git
git clone http://用户名:密码@10.0.4.55/iotpd/mpmt/hello.git
检查状态
git status
git status
检查不同
git diff
git diff
添加文件
git add
git add
提交
git commit -m "描述"
git commit -m "描述"
推送
git push
git push
拉取
git pull
git pull
设置账号
git config --global user.email "你的邮箱"
git config --global user.name "你的用户名"
git config --global user.email "你的邮箱"
git config --global user.name "你的用户名"