git-interactive-rebase-tool

授权协议 View license
开发语言 C/C++
所属分类 应用工具、 文档/文本编辑
软件类型 开源软件
地区 不详
投 递 者 邹誉
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Git Interactive Rebase Tool

Native cross-platform full feature terminal based sequence editor for interactive rebase in Git 1.7.8+.

This is the documentation for the development build. For the current stable release, please use the 2.1.x documentation.

Table of Contents

Features

Cross-platform

Built and works on Linux, macOS, Windows and BSD.

Set action

Easily set the action to pick, squash, fixup, edit, reword and drop.

Reorder rebase list

Reorder the action list with a single key press.

Multiline modification

Change action and reorder multiple lines at once with visual mode.

Toggle breaks

View commit details and diff

View the commit overview, and a full commit diff with a press of a key.

Unicode and Emoji support

Edit exec command

Easily edit the command that is run by an exec command.

Edit in external editor

Need to do something in your Git editor? Quickly shell out to your editor, make a change and return to the tool.

Setup

Most systems

git config --global sequence.editor interactive-rebase-tool

Windows

Standard Command Prompt

git config --global sequence.editor "'C:/path/to/interactive-rebase-tool.exe'"

GitBash

GitBash requires the use of winpty in order to work correctly, so to set the editor use:

git config --global sequence.editor "winpty /c/path/to/interactive-rebase-tool.exe"

Notes

Windows before version 10 has serious rendering issues with saturated darker colors, such as the blue color that is entirely illegible on modern displays. While it is possible to avoid using saturated colors, a better option is to update the theme using Microsoft's ColorTool.

Temporary Override

You can temporarily use a different sequence editor by using the GIT_SEQUENCE_EDITOR environment variable:

GIT_SEQUENCE_EDITOR=emacs git rebase -i [<upstream> [<branch>]]

Usage

interactive-rebase-tool <rebase-todo-filepath>
interactive-rebase-tool --help
interactive-rebase-tool --version

Getting Help

The tool has built-in help that can be accessed by hitting the ? key.

Default Key Bindings

Key bindings can be configured, see configuration for more information.

Key Mode Description
Up All Move selection up
Down All Move selection down
Page Up All Move selection up five lines
Page Down All Move selection down five lines
Home All Move selection to start of list
End All Move selection to home of list
q Normal Abort interactive rebase
Q Normal Immediately abort interactive rebase
w Normal Write interactive rebase file
W Normal Immediately write interactive rebase file
? All Show help
c Normal Show commit information
j All Move selected commit(s) down
k All Move selected commit(s) up
b Normal Toggle break action
p All Set selected commit(s) to be picked
r All Set selected commit(s) to be reworded
e All Set selected commit(s) to be edited
s All Set selected commit(s) to be squashed
f All Set selected commit(s) to be fixed-up
d All Set selected commit(s) to be dropped
E Normal Edit the command of an exec action
v All Enter and exit visual mode
d Diff Show full commit diff
I Normal Insert a new line
Delete All Remove selected lines
Control+z All Undo the previous change
Control+y All Redo the previously undone change

Development

Install Rust

To start developing the project, you will need to install Rust, which can generally be done using rustup.

Setup

Debian and derivatives

If you plan to build a release package you will need pkg-config and liblzma-dev. They can be installed using apt:

sudo apt install pkg-config liblzma-dev

Build and run

Use cargo to build and run the project. From the project root run:

# only build
cargo build --release
# build and run
cargo run -- <path-to-git-rebase-todo-file>

Tests

Automated tests are available for all features and ran be run with:

cargo test

Linting

The project uses Clippy to provide additional linting, run with:

./scripts/lint.bash

Format

This project uses rust-fmt to provide a consistent format. A helpful script will ensure that all files are formatted correctly:

./scripts/format.bash

Release

Install Cargo Deb
cargo install cargo-deb
Building
cargo build --release
cargo deb

A deb file will be written to target/debian/interactive-rebase-tool_*.deb.

Related Projects

License

Git Interactive Rebase Tool is released under the GPLv3 license. See LICENSE.

See Third Party Licenses for licenses of the third-party libraries used by this project.

  •  Git 命令速查表  1、常用的Git命令         命令         简要说明         git add         添加至暂存区         git add–interactive         交互式添加         git apply         应用补丁         git am         应用邮件格式补丁         git annot

  • Git介绍: Git 是一个开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目。 Git 是 Linus Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本控制软件。 Git 与常用的版本控制工具 CVS, Subversion 等不同,它采用了分布式版本库的方式,不必服务器端软件支持。 Git 与 SVN 区别 Git 不仅仅是个版本控制系统,它也是个内容

  • 把远程仓库的分支代码拉取到本地 命令:git fetch origin dev(dev是远程仓库分支名称) 在本地创建分支dev(随便起名)并切换到该分支 命令:git checkout -b dev origin/dev 查看远程分支 命令:git branch -a 查看本地分支 命令:git branch 本地分支跟远程分支关联 命令:git push --set-upstream orig

  • 学习目标: 分析 git config --list 的使用,加深它的理解 core.symlinks=false core.autocrlf=true core.fscache=true color.diff=auto color.status=auto color.branch=auto color.interactive=true help.format=html rebase.autosq

  • git svn 与svn同步 当前分支: git svn rebase 获取新分支: git svn fetch svn           尽管你可以从网上找到成千上万篇关于Git和git-svn,?0?2 但是本文主要介绍如何在一个以svn作为版本管理软件的项目里使用git。(假如你已经有了git-svn工具, 那我们就开始用git吧!) 先介绍些背景知识, Git 是 Linus Torva

  • notes-Learn-Git-Branching book Pro Git(中文版) (oschina.net) Git - Reference (git-scm.com) blog Git bash常用命令_u010897406的博客-CSDN博客 git remote add origin_Git极简教程(2)–remote级别的操作_weixin_39775127的博客-CSDN博客 Gi

 相关资料
  • 不解释了,直接练:) 练习 1,我们的项目是一本 git-book,现在我们要去添加一个新文档,介绍一下 Git 的 “仓库”。创建一个分支,执行: git checkout -b repo-doc 在 git checkout 命令里用了 -b 选项,这样如果要查看的分支不存在,就会给我们创建一个。查看分支,显示当前是在 repo-doc 这个分支上。 master * repo-doc

  • 命名 git-rebase - 重新申请提交另一个基本技巧 概要 git rebase [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>] [<upstream> [<branch>]]git rebase [-i | --interactive] [options] [--exec <cmd>] [--o

  • 主要内容:示例命令在另一个分支基础之上重新应用,用于把一个分支的修改合并到当前分支。 使用语法 示例 假设你现在基于远程分支”“,创建一个叫”“的分支。 结果如下所示 - 现在我们在这个分支(mywork)做一些修改,然后生成两个提交(commit). 但是与此同时,有些人也在”“分支上做了一些修改并且做了提交了,这就意味着”“和”“这两个分支各自”前进”了,它们之间”分叉”了。 在这里,你可以用”“命令把”“

  • 什么是区别之间的和?

  • 我正试图解决一位同事的问题。基本上,我们在做同一个项目。他使用Git扩展向他的计算机添加了一个存储库。然后他检查了我们要做的分支。是我创建了这个分支。在我这边开始不错,但他犯了140个错误。在与他快速核对后,这些参考资料似乎不起作用。现在我将解释我们从一开始就经历的所有步骤。 今天早上开始的。我们都无法启动该项目(尽管它是存储库中已有项目的副本)。我调查了一下,很明显其中一个参考资料不起作用。我只

  • 本文向大家介绍Git rebase命令使用实战,包括了Git rebase命令使用实战的使用技巧和注意事项,需要的朋友参考一下 一、前言   一句话,git rebase 可以帮助项目中的提交历史干净整洁!!! 二、避免合并出现分叉现象git merge操作   1、新建一个 develop 分支      2、在develop分支上新建两个文件   3、然后分别执行 add、commit、pus