设置用户名和邮箱
git config --global user.name “test”
git config --global user.email zjsb
配置文件: git/etc/gitconfig
创建仓库:git init
拉取: git clone
查看状态: git status
添加所有文件到暂存区: git add 。
提交到本地仓库:git commit -m
提交到远程仓库;git push
列出所有分支:git branch
列出所有远程分支:git branch -r
新建一个分支:git branch [name]
新建一个分支,并切换:git checkout -b [branch]
合并分支 git merge [branch}
删除分支 git branch -d [branch-name]
删除远程分支: git push origin --delete [branch-name]
git branch -dr [remote/branch]
忽略某个文件不需要提交,在.ignore文件中添加
git 需要设置ssh公钥,然后添加到远程仓库的个人设置中
进入 c:\用户.ssh
生成公钥: ssh-keygen