美文网首页
记不住的命令行们

记不住的命令行们

作者: 李佳芮_chatbot | 来源:发表于2018-02-22 15:28 被阅读69次

一直在更新

查看占用3000端口的进程

lsof -i :3000

Sync fork repo B_REPOSITORY with upstream repo A_REPOSITORY

  1. clone repo B_REPOSITORY to local
git clone B_REPOSITORY_URL
  1. Add A_REPOSITORY as remote to local B_REPOSITORY(mostly called upstream)
git remote add upstream https://github.com/be-forked-repo.git
  1. pull A_REPOSITORY remote(upstream)branch(like master)
git pull upstream master
  1. puah to github B_REPOSITORY
git push origin master

Add all update file

git add -u 

Show log

git log

Delete no related commit

git reset -- hard <commit_id>
git push origin HEAD --force

If you didn't publish changes, to remove latest commit, you can do

$ git reset --hard HEAD^

(note that this would also remove all uncommitted changes; use with care).

If you already published to-be-deleted commit, use git revert

$ git revert HEAD

Delete branch

git branch -D testing

https://github.com/geeeeeeeeek/git-recipes/wiki/5.2-%E4%BB%A3%E7%A0%81%E5%9B%9E%E6%BB%9A%EF%BC%9AReset%E3%80%81Checkout%E3%80%81Revert-%E7%9A%84%E9%80%89%E6%8B%A9

相关文章

  • 记不住的命令行们

    一直在更新 查看占用3000端口的进程 Sync fork repo B_REPOSITORY with upst...

  • 2018-03-19

    19点35到22点,学习命令行等知识。学会使用git bash,初步了解了常用的命令行,但是太琐碎了,记不住太多,...

  • 比 man 更强悍的命令行工具 cheat

    经常使用命令行,比如 curl 测试接口响应时间 奈何命令行参数太多,记不住怎么办?这时候你需要个男人,它就是 m...

  • fuck thefuck安装使用

    命令行纠错神器 fuck 忘记命令时TMD一下就好了 对于初学者很友好,命令行好多记不住或者知道一点拼错的,直接f...

  • android 签名查看命令行

    记录一下,用的时候老记不住,查看签名文件的签名内容 命令行: keytool -v -list -keystore...

  • perl 命令行模式

    awk和sed 单行命令很强大,但是不用了老是记不住,写perl习惯,用perl命令行处理简单的事物还是很方便的!...

  • miniconda的常用命令汇总

    写这个的目的主要是年纪大了,老是记不住命令行,索性整理下来,忘了就不用满世界找了。 和channels有关的命令 ...

  • Linux系统下git参考手册的安装

    在linux下使用git命令行的时候很多细节的参数总是记不住,缺省的帮助信息很少,需要查看额外的手册,然而默认不安...

  • docker与kubernetes常用命令集合

    docker与kubernetes常用命令行集合,做个整理,妈妈再也不用担心我记不住命令了。只根据需要记录了主要的...

  • git

    查看项目的分支们(包括本地和远程)命令行 : $ git branch -a 查看项目的分支们(只包括远程)命令行...

网友评论

      本文标题:记不住的命令行们

      本文链接:https://www.haomeiwen.com/subject/zhkztftx.html