git的使用

在git bash中查看本地仓库的状态:git status,如果本地有已经更改的文件会有提示。

把更新的文件提交到本地仓库分两步:先add,再commit。

命令:①git add 1.txt ②git commit -m "提交说明"

上面是把更新的文件提交到本地仓库,接下来是把更新的文件从本地仓库提交到服务器上(默认分支):

git push

更新:git pull

设置用户名邮箱

git config --global user.name "userName"

git config --global user.email "[email protected]"

----------------------------------------------------------------

克隆远程仓库到本地

git clone http:xxx.xxx.com/xx.git

添加远程版本库

git remote add origin http:xxx.xxx.com/xx.git


你可能感兴趣的:(git的使用)