Coder Social home page Coder Social logo

jasons-git's Introduction

jasons-git

New commands

  • search-history -- a subset of git log, git log -S $string $filename or git log -G $regex $filename or trace evolution fo the line range git log -L<start>,<end>:<file> or function git log -L<func>:<file>

  • cherry-pick-file -- alt names: pluck, snipe replace-obj to make a particular file in working tree (or staging area with --staged) resemble another object (or add a new object).

  • cherry-pick-commit -- subset of git cherry-pick, new commit that emulates what an old commit did

  • replicate -- takes a --staged flag, make working tree look like this commit (but don't change HEAD and maybe don't change staging area), alt names: copy-to

  • delete -- stage the deletion of file without affecting working tree, git rm --cached <file> or git reset <file>

  • rename-remote ^^

  • delete-tag ^^

  • root ^^

  • undo-commit ^^ or reset --soft HEAD^

  • reword-commit by default takes the last

  • ignore -- with a --untracked flag to ignore all untracked, or unstaged

  • editmsg -- edit last commit message

  • amend -- has --same-message, and same flags as commit

  • unstage -- subset of git restore --staged, takes an --all flag (git reset) -- also include git rm --cached for newly added files

  • a command to switch the staging area and working tree?

  • status -- should show: unstaged changes, staged changes, untracked files, (tracked files if asked), (ignored files if asked), should tell you if you're branch is behind remote, and advise what to do if you are merging/rebasing/bisecting/etc

  • create-fake-repo based on input file with a tree inside (which looks like git log --graph --all)

  • active-branches -- branches with stashes on them

Maybe not

graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' "$@" | sed 's/[0-9a-f][0-9a-f]*/"&"/g' ; echo '}'; }; f" $ git graphviz HEAD100..HEAD60 | dotty /dev/stdin $ git graphviz --first-parent master | dotty /dev/stdin

References

https://github.com/tj/git-extras https://github.com/gitless-vcs/gitless/tree/master/gitless/cli

https://pypi.org/project/legit/0.1.1/ https://github.com/trast/tbdiff https://github.com/dfabulich/easygit https://gitless.com/#vs

https://github.com/newren/git/blob/master/personal-docs/merge-handling-workshop

Ideas

hard mode JG_HARD_MODE -- be silent about helpful information, like undoing a reset

What do these do?

git diff --check

git ls-files -u

git log --merge --left-right -p

Goals

TODO: Never lose data. Always create a backup ref (tmp branches, tmp files). https://gist.github.com/chx/85db0ebed1e02ab14b1a65b6024dea29, or git-fugitive and see what happens when you 'discard' with X I like the idea of printing out how to undo a reset.

TODO: -n flag for every command which describes the action at 2 levels of abstraction: what happens in .git dir, and description of what happens at high level

If a subcommand has the same name as a git subcommand, then the git command will act the same as it does. The jg version may be missing flags and arguments, but if you replace jg with git in a well formed command, both have the same behavior. Complete list of exceptions to this rule are highlighted below:

jg command git command
jg diff git diff HEAD
jg merge git merge --no-ff
jg commit --tracked git commit -a
jg commit --staged git commit
jg commit --working git add -A; git commit

jasons-git's People

Contributors

jasoneveleth avatar

Watchers

 avatar

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.