Mac中的常用命令

来源:互联网 发布:电波消逝之日 知乎 编辑:程序博客网 时间:2024/05/18 02:46

Mac中的常用命令

1.显示隐藏文件:参数(YES/NO)
- defaults write com.apple.finder AppleShowAllFiles NO
2.截屏:shift+commend+4

github中命令
git config –global user.name “YouName”
git config –global user.email “”your_email@example.com“”
git config –lis 查看git配置

(2)在github上配置ssh key

ssh-keygen -t rsa -b 4096 -C "*your_email@example.com*"   //本地生成密钥,选择默认路径,密码为空ssh-add id_rsa                           //把专用密钥添加到ssh-agent的高速缓存中pbcopy < ~/.ssh/id_rsa.pub      //将公钥信息拷贝到clipboard将id_rsa.pub信息复制到gihub的ssh keys中ssh -T git@github.com          //测试ssh key配置是否正确PS:rm -rf .ssh                    //删除~/.ssh文件夹及文件,~/.ssh保存生成的过密钥

(3)上传本地项目到github上

cd + 克隆下来的项目路径 (如何在终端输入路径,可以直接把你想要知道路径的文件夹拖到终端里 这样自动就要该文件夹的路径了)
git init (git 仓库的初始化)
git add . (这里注意:add 空格 再加 .)
git status (查看add 成功没)
git commit -a -m “描述” (“ ” 引号里面输入你的描述 随意)
git remote add origin git@github.com:buaa0300/QSViewKit.git //连接远程github项目
git pull origin master //从远程下拉代码
git push -u origin master //将本地项目更新到github项目上去

0 0
原创粉丝点击