git命令

初始化仓库

git init [project-name]

克隆项目

git clone [url]

清空连接远程仓库的用户名和密码

git config --system --unset credential.helper

连接远程仓库(origin是设置本地别名,后面是仓库url)

git remote add origin https://git.oschina.net/DeMonLiuHui/Test.git

查看状态

git status

更新代码

git checkout -[file name]

添加/删除指定的文件

git add 文件夹/文件.后缀
git remove

添加所有文件

git add --all

提交并添加注释

git commit -m "注释内容”

查看分支

git branch

你可能感兴趣的:(其他)