atreus-MBP:code (test) $ git rebase -i 61e7d87
[detached HEAD 92d933c] 1 & 2 & 3 2
Date: Wed Jan 24 12:06:50 2024 +0800
1 file changed, 1 insertion(+)
Successfully rebased and updated refs/heads/test.
执行之后会进入到 vim 编辑器中,每一行代表一个 todo 项。我们这里需要 pick 第一个提交并将后面两个提交向前压缩。
修改前:
pick 44f23cb 1
pick 9d2725f 2
pick da3ba01 3
# Rebase 61e7d87..da3ba01 onto 61e7d87 (3 commands)
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup [-C | -c] = like "squash" but keep only the previous
# commit's log message, unless -C is used, in which case
# keep only this commit's message; -c is same as -C but
# opens the editor
# x, exec = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop = remove commit
# l, label
修改后:
pick 44f23cb 1
squash 9d2725f 2
squash da3ba01 3
# Rebase 61e7d87..da3ba01 onto 61e7d87 (3 commands)
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup [-C | -c] = like "squash" but keep only the previous
# commit's log message, unless -C is used, in which case
# keep only this commit's message; -c is same as -C but
# opens the editor
# x, exec = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop = remove commit
# l, label = label current HEAD with a name
# t, reset = reset HEAD to a label
# m, merge [-C | -c ] [# ]
# create a merge commit using the original merge commit's
# message (or the oneline, if no original merge commit was
# specified); use -c to reword the commit message
# u, update-ref = track a placeholder for the to be updated
# to this position in the new commits. The is
# updated at the end of the rebase
#
:wq 保存后会自动进入注释编辑,这里需要修改我们想要保留的最终 commit message。
修改前:
# This is the commit message #2:
2
# This is the commit message #3:
3
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Date: Wed Jan 24 12:06:50 2024 +0800
#
# interactive rebase in progress; onto 61e7d87
# Last commands done (3 commands done):
# squash 9d2725f 2
# squash da3ba01 3
# No commands remaining.t/COMMIT_EDITMSG" 28L, 610B
# You are currently rebasing branch 'test' on '61e7d87'.
#
# Changes to be committed:
# modified: src/main/java/file
#
修改后:
1 & 2 & 3
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Date: Wed Jan 24 12:06:50 2024 +0800
#
# interactive rebase in progress; onto 61e7d87
# Last commands done (3 commands done):
# squash 9d2725f 2
# squash da3ba01 3
# No commands remaining.t/COMMIT_EDITMSG" 28L, 610B
# You are currently rebasing branch 'test' on '61e7d87'.
#
# Changes to be committed:
# modified: src/main/java/file
#
保存后即可完成 rebase,此时 git 日志如下:
atreus-MBP:code (test) $ git log -2 --oneline
92d933c (HEAD -> test) 1 & 2 & 3
61e7d87 (origin/test) merge: Merge branch 'test' of https://gitee.com/atreus1125/code into test
eclipse中使用maven插件的时候,运行run as maven build的时候报错
-Dmaven.multiModuleProjectDirectory system propery is not set. Check $M2_HOME environment variable and mvn script match.
可以设一个环境变量M2_HOME指
1.建好一个专门放置MySQL的目录
/mysql/db数据库目录
/mysql/data数据库数据文件目录
2.配置用户,添加专门的MySQL管理用户
>groupadd mysql ----添加用户组
>useradd -g mysql mysql ----在mysql用户组中添加一个mysql用户
3.配置,生成并安装MySQL
>cmake -D
好久没有去安装过MYSQL,今天自己在安装完MYSQL过后用navicat for mysql去厕测试链接的时候出现了10061的问题,因为的的MYSQL是最新版本为5.6.24,所以下载的文件夹里没有my.ini文件,所以在网上找了很多方法还是没有找到怎么解决问题,最后看到了一篇百度经验里有这个的介绍,按照其步骤也完成了安装,在这里给大家分享下这个链接的地址
import java.io.UnsupportedEncodingException;
/**
* 转换字符串的编码
*/
public class ChangeCharset {
/** 7位ASCII字符,也叫作ISO646-US、Unicode字符集的基本拉丁块 */
public static final Strin
其实这个没啥技术含量,大湿们不要操笑哦,只是做一个简单的记录,简单用了一下递归算法。
import java.io.File;
/**
* @author Perlin
* @date 2014-6-30
*/
public class PrintDirectory {
public static void printDirectory(File f
linux安装mysql出现libs报冲突解决
安装mysql出现
file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-server-5.5.33-1.linux2.6.i386 conflicts with file from package mysql-libs-5.1.61-4.el6.i686
Dear,
I'm pleased to announce that ktap release v0.1, this is the first official
release of ktap project, it is expected that this release is not fully
functional or very stable and we welcome bu