github-stars

Stars

jlevy/the-art-of-command-line
jwasham/coding-interview-university
justjavac/free-programming-books-zh_CN
sorenduan/awesome-java-books
doocs/source-code-hunter
kamranahmedse/developer-roadmap
shfshanyue/op-note
doocs/technical-books
doocs/advanced-java
michaelliao/awesome-python-webapp
Blankj/awesome-java-leetcode
521xueweihan/HelloGitHub
microsoft/calculator
itisyang/playerdemo
MisterBooo/LeetCodeAnimation
ZhongFuCheng3y/3y
EasyPost/easypost-java
muhammederdem/vue-interactive-paycard
muhammederdem/mini-player
macrozheng/mall-swarm
antvis/G2Plot
liyasthomas/postwoman
vuejs/cn.vuejs.org
ppoffice/hexo-theme-icarus
komeiji-satori/Dress
jackfrued/Python-100-Days
hollischuang/toBeTopJavaer
gabrielbull/php-ups-api
PanJiaChen/vue-element-admin
Snailclimb/JavaGuide
QianGuoqing/vue-qabler
bailicangdu/vue2-elm
bhnddowinf/vuejs2-learn
kubernetes/ingress-nginx
spring-cloud/spring-cloud-kubernetes
ElemeFE/element
kubernetes/kubernetes
codecentric/spring-boot-admin
ghostchina/Roon-zh
ghostchina/Casper-zh
wenkeShi/ghost-caspro
Sioxas/vue-music
bluefox1688/vue-cli-multi-page
lincenying/vue2-multiple-entry
sqshq/piggymetrics
dyc87112/SpringCloud-Learning
forezp/SpringCloudLearning
deepfakes/faceswap
takezoe/amateras-modeler
Skyexu/TopSup
jmnarloch/ribbon-discovery-filter-spring-cloud-starter
alibaba/p3c
apache/incubator-brpc
thx/RAP
cloudframeworks-springcloud/user-guide-springcloud
lihengming/spring-boot-api-project-seed
takari/maven-wrapper
alibaba/druid
iluwatar/java-design-patterns
kdn251/interviews
otale/tale
alibaba/fastjson
mybatis/spring-boot-starter
portainer/portainer
tiimgreen/github-cheat-sheet
EbookFoundation/free-programming-books
litten/hexo-theme-yilia
dangdangdotcom/dubbox
apache/dubbo
angular/angular-seed
angular/angular2-seed
mybatis/spring
mybatis/generator
iissnan/hexo-theme-next
angular/quickstart
snapappointments/bootstrap-select
uglide/RedisDesktopManager
jhipster/generator-jhipster
t4t5/sweetalert
giantray/stackoverflow-java-top-qa
akullpp/awesome-java
google/guava
chartjs/Chart.js
qibaoguang/Spring-Boot-Reference-Guide
spring-projects/spring-boot
reactjs/react-router-tutorial
dangrossman/daterangepicker
fragaria/angular-daterangepicker
ColorlibHQ/AdminLTE
apidoc/apidoc
mousycoder/server-api
quartz-scheduler/quartz
xishuixixia/quartz-monitor
tavenli/URACS
gulpjs/gulp
learning/SublimeServer
http-party/http-server
google/styleguide
ocombe/ocLazyLoad
HubSpot/pace
younghz/Markdown
xetorthio/jedis
og/gulp-book
dotnet/core
yeoman/generator-angular
yeoman/yeoman
jirikavi/AngularJS-Toaster
onokumus/metismenu
angular-ui/ui-select
angular-ui/ui-router

git-upgrade

1. 安装yum源

centos7:
wget http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-1.noarch.rpm && rpm -ivh wandisco-git-release-7-1.noarch.rpm
or
wget http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm && rpm -ivh wandisco-git-release-7-2.noarch.rpm

2. 安装git 2.x

yum install git -y

3. 验证

git –version

git-delete-tags

查看远程Tag

git ls-remote –tags

删除远程主机指定Tag

git push origin :refs/tags/

Git 对比分支差异

查看dev分支有而master分支没有的提交:

1
git log dev ^master

Git 修改远程主机地址

  1. 可直接修改远程主机地址:

    git remote set-url origin [url]

其中origin为远程主机名称,url为要设置的远程主机地址
例如:git remote set-url origin gitlab@gitlab.chumob.com:php/hasoffer.git

  1. 删除远程主机后重新添加

    git remote rm origin
    git remote add origin [url]

Git常用操作命令

git config 设置

查看当前配置

1
git config -l

设置默认用户名邮箱

1
2
git config --global user.name "test"
git config --global user.email"test@gmail.com"

保存密码

1
git config --global credential.helper store

设置默认使用sublime编辑器

1
git config --global core.editor ="'D:/Program Files/Sublime Text 3/sublime_text.exe' -w" # 设置Editor使用sublime

设置别名

使用Beyond Compare作为Git Bash文本差异对比冲突合并工具

在Windows下安装Git命令行后,默认的文本比较工具一般是Git自己内置的diff实现,可以用更为通用方便的外部工具Beyond Compare工具来代替内置diff软件来进行文件比较及合并和解决冲突。

1. 卸载

如安装过,记录当前版本号,例如:4.2.5.23088
卸载后重启计算机

2. 安装

下载地址:
https://www.scootersoftware.com/download.php

建议切换与原有安装版本不同的大版本

安装时建议记录安装路径,如:C:\Program Files\Beyond Compare

从官网上下载的评估版本评估周期为30天 - 根据打开软件的时间累加,实际评估时间根据使用频率不同,可达2~3个月
评估过期后,需要重新执行第1、2步

3. Git配置

Git用户配置文件一般路径:
C:\Users\username.gitconfig

Github Pages Vue 项目发布

使用Github Pages搭建Vue项目在线演示demo

分支:gh-pages
访问Url:https://[user_name].github.io/[project_name]
关键点:利用Github提供的静态页解析功能, 将静态页面推送到Github个人项目仓库的gh-pages分支下

在现有vue项目的基础上,执行以下步骤:

1
2
3
4
5
6
7
8
9
10
# 1.切换分支
git checkout gh-pages
# 2.构建项目,生成build文件
npm run build
# 3.强制添加dist文件夹,因为.gitignore文件中定义了忽略该文件
git add -f dist
# 4.提交
git commit -m 'Initial the page of project'
# 5.部署dist目录下的代码:使用git subtree命令可以在同一分支上维护源代码以及构建代码,在部署时仅仅推送dist目录下的内容
git subtree push --prefix dist origin gh-pages

提示:

在将Vue应用部署到gh-pages分支后,可能会出现部分资源无法加载的问题,原因就在于vue中的webpack配置在打包时其publicPath为根路径,如果该静态页在服务器中被访问则不会出现以上问题。在github解析时如果按照根路径解析会出错,因此在github上部署静态页时可以考虑将publicPath设置为当前目录,即 publicPath: ‘./‘。
同理,使用Vue-cli webpack模板生成的vue项目,出现上述问题应设置config/index.js中build对象下的assetsPublicPath字段为assetsPublicPath: ‘./‘,原理都是设置publicPath字段

Git cherry-pick 摘樱桃

cherry-pick,顾名思义:摘樱桃。如果说每一次commit是一颗樱桃,那么你可以通过cherry-pick命令将这一颗樱桃采摘到另外一颗樱桃树(branch)上。
命令:

1
git cherry-pick [--no-commit] 997367b(commit id)
  • –no-commit:预计可能会出现冲突的时候,建议这样用,以便先自查并解决冲突后再手动提交
  • commit id:可通过git log来查看,该命令执行后会把997367b这颗樱桃复制到当前分支并自动commit(如果没有冲突的话)

注意一点,cherry-pick产生的提交与原提交commit id不同

Git-查看代码提交次数

Git仓库代码提交次数:
git log –pretty=tformat: –numstat | awk ‘{ add += $1; subs += $2; loc += $1 - $2 } END { printf “added lines: %s, removed lines: %s, total lines: %s\n”, add, subs, loc }’ -

代码新增修改总计行数:
git log –pretty=tformat: –numstat | awk ‘{ add += $1; subs += $2; loc += $1 - $2 } END { printf “added lines: %s, removed lines: %s, total lines: %s\n”, add, subs, loc }’ -

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×