fugitive

授权协议 MIT License
开发语言 JavaScript
所属分类 应用工具、 终端/远程登录
软件类型 开源软件
地区 不详
投 递 者 孟鸿德
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

fugitive ·

Simple command line tool to make git more intuitive, along with useful GitHub addons.

fugitive provides new or alternative commands to use with git, and alsoadds a few helpful tools for GitHub repositories.

It's similar to git-extras but is designed to be moreportable. git-extras is written entirely as a set of shell scripts,which means platform support outside Unix is at best hit or miss.

On the other hand, fugitive is written in Nim to allow for betterportability. Other benefits are that Nim is super fast, flexible, and morereadable than the often cryptic bash syntax.

Git Town is a project with similar goals written in Go.

installation

Linux, Windows, and macOS prebuilt binaries are available from releases.Download the file for your system from the latest release and extract the binarywithin to somewhere in your $PATH.

Alternatively if you have Nim and Nimble installed( and ~/.nimble/bin is in your path ), you can also simply run:

nimble install fugitive

This will make the latest version of fugitive available to you anywhere.Check out Nimble if you'd like to know more about package installation.

usage

Usage: fugitive [command] [...args] (...options)

Commands:
  alias     [name [--remove|-r]] [expansion]
                                 List, add, or remove git aliases
  config    [key] [value] [--remove|-r]
                                 Set, update, or remove fugitive settings
  changelog [file] [--tag|-t:<tag>] [--last-tag|-l:<tag>] [--overwrite|-o]
            [--no-anchor] [--no-title] [--no-divider] [--init]
                                 Write a list of changes since last tag or between two tags
  clone     <...repos>           Alias for `fugitive mirror`
  install   [--override|-o] [--force|-y]
                                 Alias various fugitive commands as git subcommands
  lock      <...files>           Prevent changes to the specified files from being tracked
  mirror    <...repos>           Wrapper around `git clone` with various URL shorthands
  open      [repo]               Open the current or specified repository's homepage
  profile   [username]           View a summary of a GitHub user profile
  release   <tag> [--repo|-r:<repo>] [--file|-f:<filepath>] [--description|-d:<desc>]
            [--desc-file|-D:<filepath>] [--draft|-N] [--prerelease|-p]
            [--target-commit|-T:<commitish>]
                                 Create a GitHub release and/or upload assets to a release
  scrap     <...files>  [--all|-a]
                                 Discard local changes to the specified files
  summary                        Summarize git repository statistics
  undo      [#] [--hard|-h]      Undo the last commit ( or last # commits )
  uninstall                      Remove git aliases added by `install`
  unlock    <...files>           Resume tracking changes to these locked files
  unstage   <...files> [--all|-a]
                                 Remove files from the git stage area

Options:
  --help, -h       Show this help message
  --version, -v    Output the fugitive version number

For help on a specific command, provide the --help/-h flag afterthat command, ie. fugitive changelog -h.

configuration

fugitive stores a configuration file in your user configuration directorycalled fugitive.ini. You can manage this file using the fugitive configcommand.

TIP: Using the fugitive config command with no arguments will print the fullfilepath to your config file.

You can, for example, tell fugitive explicitly what to use as your GitHubusername when using various shorthand features:

fugitive config github.username <name>

Here's the full list of available settings:

setting name type default value
terminal_colors bool on
github.username string -

Settings of the type bool are retrieved using Nim's parseBool,so they can be set to any of y, yes, true, 1, on or n, no, false, 0, off.

username

Some commands support a shorthand for referring to GitHub repositories,provided you've configured your GitHub username or it can be inferredfrom your git config.

<name>

The simplest shorthand is for referencing one of your own repositories,which you can do by simply entering its name. For example if you're@citycide, entering fugitive open cascade would openyour browser to cascade.

<owner>/<name>

You can also use any <owner>/<project> combination you'd like, such as:

  • fugitive open nim-lang/nim
  • fugitive mirror soasme/nim-markdown

By default fugitive will use your local git username (fromgit config --global user.name) for these shorthands but you can explicitlyset it yourself. You'll also be prompted to provide it if you try to usethese shorthands and fugitive isn't able to infer it.

alias installation

After installation, you can make some of fugitive's commands more accessible byrunning fugitive install, which will attach them to git as subcommands,making git undo == fugitive undo.

Commands installed to git include:

alias
changelog
lock
mirror
open
profile
release
scrap
summary
undo
unlock
unstage

Existing aliases are safe as fugitive will not override them unlessthe --override ( or -o ) flag is explicitly passed.

If you want to remove these installed aliases, use fugitive uninstall.Only aliases that fugitive installed and match the fugitive command willbe removed.

Note the mirror command - git commands can't be overridden, so whilefugitive clone is possible it can't be aliased as a git subcommand.Therefore fugitive mirror is the main command and the one that willbe attached to git, while clone is just an alias for convenience.

building

To build fugitive from source you'll need to install Nim and its packagemanager Nimble.

  1. Clone the repo: git clone https://github.com/citycide/fugitive.git
  2. Move into the newly cloned directory: cd fugitive
  3. Compile a development build for your current platform: nimble build
  4. Compile a release build for your current platform: nimble release

contributing

This project is open to contributions of all kinds! Please check and searchthe issues if you encounter a problem before opening a new one.Pull requests for improvements are also welcome — see thesteps above for development.

license

MIT © Bo Lingen / citycide

  • \(>Codeforces \space 555 B. Case of Fugitive<\) 题目大意 : 有 \(n\) 个岛屿有序排列在一条线上,第 \(i\) 个岛屿的左端点为 \(l_i\) 右端点为 \(r_i\) ,岛屿之间两两不相交, 现在对于每一个 \(1 \leq i < n\) 第 \(i\) 岛屿要和第 \(i + 1\) 岛屿之间建一座桥,桥的长度左右端点必须得在岛上。现

  • 题目大意   有一些不相交线段和一些桥,桥可以架在两个相邻的线段上。求现有的桥是否可以使所有线段连通。 题解   在两个线段上架桥,桥的长度在一个范围内,相当于一个长度的区间,一个桥只有一个长度,相当于一个长度的点。这就转化成了点匹配区间问题。   点匹配区间问题我们在贪心(POJ3614)那里学了,把所有区间按照左端点从大到小排序,把点按照位置从大到小排序,每次总是把最右侧区间与在该区间内的最右

  • B. Case of Fugitive time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Andrewid the Android is a galaxy-famous detective. He is now chasing a

  • B. Case of Fugitive time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Andrewid the Android is a galaxy-famous detective. He is now chasing a

  • 题目链接:http://codeforces.com/contest/555/problem/B   题目大意:有n个岛m座桥,要求相邻两个岛之间选择一个桥,桥的长度大于等于两个岛之间的距离,小于等于两个岛两端之间的距离,输出一种可行解,如果不行输出no   题目思路:直接贪心,先按照两个岛之间的距离从大到小,然后选出一个符合要求的最大的桥,如果找不到了就no,否则继续。 贪心策略的合理性在于,当

  • Andrewid the Android is a galaxy-famous detective. He is now chasing a criminal hiding on the planet Oxa-5, the planet almost fully covered with water. The only dry land there is an archipelago of n n

  • B. Case of Fugitive time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Andrewid the Android is a galaxy-famous detective. He is now chasing a

  • 一道思维题。 首先我们需要转化一下题意。 对于两个相邻的区间 [ l i , r i ] , [ l i + 1 , r i + 1 ] [l_i,r_i],[l_{i+1},r_{i+1}] [li​,ri​],[li+1​,ri+1​],我们将这两个区间合并一下,得到能够连接这两个区间的线段长度: [ l i + 1 − r i , r i + 1 − l i ] [l_{i+1}-r_i,r

  • B. Case of Fugitive Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/555/problem/B Description Andrewid the Android is a galaxy-famous detective. He is now chasing a criminal

  • 题目链接 http://codeforces.com/contest/556/problem/D 题目大意 给你n个岛和m个桥,岛在一条线上,有左端点l, 和右端点r(r>l),问你能不能用桥把所有岛连在一起 要求:桥要>=两个相邻岛之间最短距离,<=最大距离 思路 核心思想 有些时候,具体的问题不好思考,比如这题的岛和桥这些具体的东西,我们可以把他们转化成抽象的线和点将有助于我们思考。 由于这题

  • 题意:给出n段路和m座桥。每段路的两个端点一维坐标表示。要从m座桥中选出一些桥搭在每两条相邻的路上,使得这些路全部连通。每两条相邻的路之间只能搭一座桥,且桥的两端必须恰好分别落在两段路上。如果存在一种搭桥方法,则输出Yes并按题目给定的路形成的空隙的顺序输出每座桥的序号,若不能则输出No。 题意换个说法实际上就是给定n - 1个区间和m个数,问是否能从m个数中选出n - 1个数,恰好分别落在n -

  • 题意 n 个岛,看做线段[li,ri] , m <script type="math/tex" id="MathJax-Element-3">m</script>座桥,每座桥只能用一次且用在相邻两岛,可行时输出方案 题解 将所有相邻两岛的架桥长度范围按右端点第一关键字从小到大排序,左端点第二关键字从小到大排序,贪心,每次尽量找长度最短的桥架桥。 代码 /// by ztx #include <cs

  • 链接 题目大意:n个岛屿,在一条线上,岛屿有起点和终点,有m座桥,问能不能用n-1座桥把岛屿连起来 题目思路: 根据岛屿信息,我们将 n−1 个需要的区间拿出来,试着用给我们的桥长度去覆盖这些区间。 问题转化为了给一些区间和一些点,一个点最多覆盖一个区间,询问这些点能否将区间全覆盖。(桥的长度值就是点坐标,一共m个点;相邻岛屿间距范围就是一个区间,区间左端点坐标值为相邻岛屿最小距离,区间右端点坐标

  • 经常使用 Gblame 来查看代码提交的参数, 关闭不得不 移动到弹出的buff然后来:close 现在增加一个filetype 函数, 来触发当第二次 按下Gblame后, 关闭掉git 的提示 vimrc let mapleader = "," function! s:ToggleBlame() if &l:filetype ==# 'fugitiveblame' c

相关阅读

相关文章

相关问答

相关文档