Git Product home page Git Product logo

git-extras's Introduction

Git Extras

Little git extras.

Screencasts

Just getting started? Check out these screencasts:

Installation

See the Installation page.

Commands

Go to the Commands page for basic usage and examples.

GIT utilities -- repo summary, repl, changelog population, author commit percentages and more

Contributing

Interested in contributing? Awesome!

Please read Contributing before you make a PR, thanks!

The change of the default branch

As of Git Extras 6.4 the assumed default branch name changed from master to main. This affects the Git Extras commands git archive-file, git delete-merged-branches, git delta, git pull-request, git show-merged-branches, git show-unmerged-branches, and git squash.

To change the default branch name to master: change either the configuration git-extras.default-branch or init.defaultBranch to master; the former takes precedence.

For example, git config git-extras.default-branch master.

git-extras's People

Contributors

apjanke avatar chernjie avatar go2null avatar guenhter avatar hemanth avatar hyperupcall avatar jankatins avatar jweslley avatar lee-w avatar lukechilds avatar markeissler avatar muhtasib avatar natim avatar nickl- avatar nicolaiskogheim avatar pabs3 avatar pbnj avatar qw3rtman avatar richardfearn avatar sanusart avatar singingwolfboy avatar spacewander avatar tardypad avatar tfendin avatar timfeirg avatar tj avatar v-y-a-s avatar vanpipy avatar wpwoodjr avatar yuravg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

git-extras's Issues

[question] how to generate history changelog

I want to add a change log for my project mongoskin.

What I got from git changelog is latest commit since last tag v0.1.1, can I generate all the change log ?

\nn.n.n / 2011-04-30 \n==================\n
  * add mongoskin.router
  * more document

MANPATH in the makefile

Just a note, MANPATH already has a meaning in unix shells. If a user wants to add a random directory to being search by man, they add it to MANPATH. For example, in my environment, I have $MANPATH defined to

/usr/share/man:/usr/local/share/man:/Users/wlynch/Homebrew/share/man:/opt/local/man:/Library/TeX/Distributions/.DefaultTeX/Contents/Man:/usr/X11/share/man

Because you use:

MANPATH ?= ${PREFIX}/man

the Makefile will pick up my environment variable instead of using the PREFIX style one. The fix that I used was I renamed MANPATH to MANPREFIX.

Thanks!

DocumentUp

I think that would be good if you guys use DocumentUp to help on your documentation, http://documentup.com/visionmedia/git-extras

It's already looking good, if you only add this on the beginning of the README will help some people that doesn't know this tool.

git-graft change

I use git-graft often (which I wrote). Ironically, I always forget that it requires a second parameter. I think it would fit the git toolsuite if it defaulted to the current branch.

Current Usage:

$ git graft feature/x 
# merge --no-ff's feature/x into master, then deletes feature/x 

New Usage:

$ git graft feature/x
# merge --no-ff's feature/x into current branch, then deletes feature/x 

And (optionally):

$ git graft feature/x develop
# merge --no-ff's feature/x into develop, then deletes feature/x 

Thoughts?

git-effort(1) - humanize active days

"460" is fine but not that nice, maybe had a flag, not sure which for default yet but that could easily be something nicer like "2 months" "2 years" blah blah

git-contributors improperly pads for usernames with multibyte characters

An example from the Mocha Readme.md, FARKAS and Ryunosuke's names are improperly padded:

project: mocha
commits: 502
files  : 86
authors: 
  352   Tj Holowaychuk          70.1%
   98   TJ Holowaychuk          19.5%
   21   Guillermo Rauch         4.2%
    6   James Carr              1.2%
    4   Joshua Krall            0.8%
    3   Ben Lindsey             0.6%
    3   Nathan Rajlich          0.6%
    2   FARKAS Máté           0.4%
    2   Quang Van               0.4%
    1   Steve Mason             0.2%
    1   Yuest Wang              0.2%
    1   hokaccha                0.2%
    1   David Henderson         0.2%
    1   Fedor Indutny           0.2%
    1   Fredrik Lindin          0.2%
    1   Harry Brundage          0.2%
    1   Konstantin Käfer      0.2%
    1   Maciej Małecki         0.2%
    1   Raynos                  0.2%
    1   Ryunosuke SATO          0.2%

git changelog

construct changelog from the last tag, open in $EDITOR

FYI - one liner broke

FYI TJ, your one liner broke when GitHub switched their url structure:

$ curl https://github.com/visionmedia/git-extras/raw/master/bin/git-extras | INSTALL=y sh

Its works with the new structure though:

$ curl https://raw.github.com/visionmedia/git-extras/master/bin/git-extras | INSTALL=y sh

Add man pages to git-extra commands

Something I miss are man pages for each of the available git-extra commands. I kinda would like to check everything via the command line and not have to go to the github page.

Bash completion

Would it be possible to make Bash completion aware of git-extras, allowing for commands like git-graft to recognize available branches?

It seems to me there's no simple way to do this - but my bash_completion.d fu is weak, so perhaps there's a solution after all?

git ignore

to add patterns quickly to .gitignore

drop git commit from git-release

Would it be possible to drop the git commit step from git-release? Or make it optional at the least?
It's very frustrating to try to release only to fail because there's nothing to commit, so then you need to make some nonsensical change just to be able to run the command. And TBH, why would you EVER want to release anything that hasn't been committed already? That's just asking for trouble.

Installation one-liner needs to upgrate to https

The installation one-liner in the README uses the http protocol which doesn't seem to work anymore:

$ curl http://github.com/visionmedia/git-extras/raw/master/bin/git-update-extras | sh

Using https instead did work though.

$ curl https://github.com/visionmedia/git-extras/raw/master/bin/git-update-extras | sh

Git squash commits even if merge fails

I had a few merge failures when i git squashed my branch into master. I excepted it to leave the commit unmerged and let me merge and then push it myself. But in this case it just pushed broken code to the master with all the conflict markers.

It could be fixed by just checking the git merge result

Perhaps this code....

if [ $CODE -eq 0 ];then
echo "Merge Failed. Please fix it and do a git commit"
exit $CODE
fi

cancel feature finish if branch is not commited

Hi TJ
Thks for the great tool
I noticed the other day that git feature finish does not check that you have committed all your changes before deleting the branch
I managed to restored the deleted branch but I think it could be useful to cancel action if not all changes have been committed

proposal: git-flick, move a commit to another branch

While working on a feature branch, I often come across and fix various minor issues (e.g. code readability). Ideally such commits should live on a separate branch to avoid obscuring feature changes.

Based on IRC conversations (#git on FreeNode), here's what I came up with (tentatively called git-flick, for lack of inspiration):

#!/usr/bin/env bash

set -e
set -x

treeish=${1:?}
target_branch=${2:?}

git checkout "$target_branch"
git cherry-pick "$treeish"
# return to original branch
git checkout @{-1}
# remove commit from original branch
# NB: rebase shortens treeish to seven characters; rebasing from commit's parent
GIT_EDITOR="grep -v ${treeish:0:7}" git rebase -p -i "${treeish}^"

(This is not extensively tested yet.)

If this is deemed of general interest, I could submit a pull request.

Installing via brew doesn't install all commands

I just installed using brew ('brew install git-extras') but only a subset of the commands were actually installed:

$ ls -l /usr/local/Cellar/git-extras/0.0.1/bin
total 32
-r-xr-xr-x 1 mason wheel 509 Sep 13 12:06 git-changelog
-r-xr-xr-x 1 mason wheel 160 Sep 13 12:06 git-count
-r-xr-xr-x 1 mason wheel 182 Sep 13 12:06 git-ignore
-r-xr-xr-x 1 mason wheel 232 Sep 13 12:06 git-release

Perhaps the HEAD is incomplete right now? Here's the output from the installation:

$ brew install git-extras
/usr/local/bin/git
==> Cloning git://github.com/visionmedia/git-extras.git
Cloning into /Users/mason/Library/Caches/Homebrew/git-extras--git...
remote: Counting objects: 254, done.
remote: Compressing objects: 100% (119/119), done.
remote: Total 254 (delta 134), reused 240 (delta 128)
Receiving objects: 100% (254/254), 27.28 KiB, done.
Resolving deltas: 100% (134/134), done.
==> Checking out tag 0.0.1
==> make install
/usr/local/Cellar/git-extras/0.0.1: 5 files, 20K, built in 2 seconds

git delete-branch does not respect the -D argument

When you want to delete an unmerged branch in Git you need to pass on the -D argument. This does not work with git-delete-branch , and the command fails on the local part (still nukes the remote branch)

Git-ignore re-expands wildcards

If you run git ignore '*.o', and there are .o files in the current directory, then git-ignore will add each of those files individually to .gitignore instead of adding the wildcard. Thus, any new .o files, and any .o files in subdirectories, won't be ignored. That's the behavior we should expect without quotes around the argument, git ignore *.o, in which case the shell does the expansion, not the script.

git-effort

compute (per author?) the amount of effort (time) put in to a project. make some guesses based on first/last commit to the project each active day, or something similar to this, maybe there's a nice algo out there

git-effort is blank on Linux (Ubuntu 11.10)

It looks like it's outputting something as there's blank lines between the top and bottom headers. Perhaps you're setting the colors in a Mac specific way? Be happy to do some debugging as this is a really useful feature,

Feature proposal: git-archive-file - archive all tracked files into a single zip archive

I have written a small scripts that archives all tracked files into a single zip archive with a useful name (e.g. git_repo_name.v0.2.3-0-g6436ae9.zip). I need this quite often, because I work with a lot of clients who do not use git, so I thought this might be useful for other people.

Do you think this would be a nice addition to have this in git-extras? If you think this is worthy to integrate into git-extras I will fork git-extras, figure out how to write the necessary files for man pages and and auto-completion and send you a pull request when I am done.

So let me know if you are interested in this.

Source: git-archive-file

FeatureRequest: git-effort filter

It would be nice if you could filter out directories rather than just filtering by the number of commits.

Mostly I want to filter out test/* but i'm sure i'll hit other cases as well. grep would work but on a large repo the time it takes to go through a large directory you want to filter is a bit much.

new feature: git graph

I have this alias on my .gitconfig file:

[alias]
    graph = log --graph --date-order -C -M --pretty=format:\"<%h> %ad [%an] %Cgreen%d%Creset %s\" --all --date=short

it displays a nice graph with all the commits, branches names, etc:

graph

May be useful to somebody else, since I added this alias I stopped using gitk completely.

source: http://stackoverflow.com/a/6212370

License

Hello, can you please specify under which license this code is distributed (couldn't find any in Readme.md and mangpages)?

Thanks :)

Feature: git root

Found this today, thought it might be a nice addition to the library.

Wherever you are in your project git root will take you to the root directory (where .git is stored).

I'm horrible with bash scripting, so maybe someone can whip up a script, but here's an alias.
alias gr='[ ! -z git rev-parse --show-cdup] && cdgit rev-parse --show-cdup || pwd'

Took this snippet from this article: http://www.clientcide.com/best-practices/j-or-z-for-command-line-awesomeness/

git revert multi commit

revert multi commit like git-revert.

now I use flowing steps to revert multi commit:
git reset --hard A
git reset --soft @{1} # (or ORIG_HEAD), which is D
git commit -a

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.