git status
添加文件到Git仓库,分两步:html
查看仓库的当前状态(哪些文件有改动) git
git status
查看当前的修改的内容ssh
git diff
查看历史纪录code
git log
本地git仓库用户修改(Git Bash Here)htm
可参考https://www.cnblogs.com/miaodi/p/7147818.htmlblog
查看链接的远程仓库地址 rem
git remote -v
删除链接的远程仓库get
git remote rm origin
从新设置新的远程链接的仓库地址it
git remote add origin username@192.168.1.1:/home/repository/meadowlark.git
修改文件及文件夹所属用户email
chown [-R] [用户名称] [文件或目录] chown [-R] [用户名称:组名称] [文件或目录]
本地仓库
生成SSH密钥文件
ssh -keygen
首先 ssh-keygen 会确认密钥的存储位置(默认是 .ssh/id_rsa),
而后它会要求你输入两次密钥口令。
若是你不想在使用密钥时输入口令,将其留空便可。
建立SSH Key
ssh-keygen -t rsa -C "youremail@example.com"