git相关及xshell相关

git常见问题及操作;

  # git config命令的–global参数,用了这个参数,表示你这台机器上所有的Git仓库都会使用这个配置,当然也可以对某个仓库指定不同的用户名和Email地址。
 --------------------------------------------
# 1.查看git配置信息
$ git config --list
 --------------------------------------------
# 2.查看git用户名、密码、邮箱的配置
$ git config user.name
$ git config user.password
$ git config user.email
 --------------------------------------------
# 3.设置git用户名、密码、邮箱的配置
$ git config user.name "freedom"
$ git config user.password "123456"
$ git config user.email "1548429568@qq.com"
--------------------------------------------
# 3.设置git用户名、密码、邮箱的配置(全局配置)
$ git config --global user.name 用户命
$ git config --global user.name freedom
$ git config --global user.password 密码
$ git config --global user.password abc0506abc
$ git config --global user.password 邮箱
$ git config --global user.email "1548429568@qq.com"
 --------------------------------------------
# 4.修改git用户名、密码、邮箱的配置(跟设置语法一样,没有用户名就添加,有了用户名就修改)
$ git config user.name "freedom"
# 4.修改git用户名、密码、邮箱的配置(全局配置)
$ git config --global user.name "freedom"
git fetch (重新拉取分支);

git add . 并未 git commit 回退操作 git reset HEAD .
git commit 到本地分支,没有push到远程 回退操作 git log 得到id  再git reset --hard id(git reset HEAD^(保留代码回退到git add之前));
————————————————————

xshell相关;

  连接上 xshell   cd  /opt
su //切换root用户
rz  -be //上传;
sz //下载 到桌面
mv 文件原名 新名//文件改名 ex: mv a.txt b.txt
 tar -xvf    tar -cvf //tar 压缩 解压
unzip a.zip   //使用unzip命令解压zip压缩包 inflating ,看到该单词,表明ZIP解压缩成功了
zip -r test.zip 1.html 2.html //将1.html 2.html压缩成test.zip
zip -r test.zip test //将test文件压缩成test.zip
cp -r dd.txt  ee.txt   :复制并改名,并存放在当前目录下  (cp源文件名 新文件名);

杀进程  killall  server(名称)  //全部杀死
杀进程  kill -9  port(端口名称)   //干掉指定名称
ps -ef | grep '服务名'  //查看进程
nginx服务启动 // 进入/home/xtgl/nginx/sbin目录下 执行 ./nginx

posted @ 2020-09-04 16:36  johnny-cli  阅读(366)  评论(0编辑  收藏  举报