GIT 经常使用命令

①:配置我的信息
$ git config --global user.name "Your Name"            //姓名
$ git config --global user.email "email@example.com"   //邮箱
②:生成公钥,SSH认证做用
//进入$HOME/.ssh目录。若是没有建立过ssh密钥,目录为空。
$ cd ~/.ssh
$ ssh-keygen -t rsa -C "yourname@hotmail.com"
③:提交,加入本地版本库,从远程版本库拉下合并,推到远程版本库
$ git add .
$ git commit -m "备注"
$ git remote add coding git@git.coding.net...
$ git pull coding master
$ git push coding master

④git或略文件 .gitignore

/*
!.gitignore
!fw/
!fw/    
说明:忽略所有内容,可是不忽略 .gitignore 文件、根目录下的 /fw/ 和 /fw/ 目录,二级目录应再次配置;
相关文章
相关标签/搜索