JSPM

  • Created
  • Published
  • Downloads 317
  • Score
    100M100P100Q78934F
  • License MIT

Common utility commands for Git repositories.

Package Exports

  • extra-git

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (extra-git) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Common utility commands for Git repositories.
📦 NPM, 😺 GitHub, 📜 Files, 📘 Wiki.

This is an extension of "git-extras" and "git-extra-commands", including some additional commonly used git tools; cpush, apush, and xclone. You can install this with npm install -g extra-git.

Stability: Experimental.


# Commit current changes and push (inc. submodules)
$ egit cpush "message"

# Amend current changes and push (inc. submodules)
$ egit apush

# Clone repository to local (inc. submodules)
$ egit xclone openstack/openstack




# Do a hard reset and delete all untracked files
$ egit clear


# List authors
$ egit authors --list
$ egit authors --list --no-email

# TJ Holowaychuk <tj@vision-media.ca>
# hemanth.hm <hemanth.hm@gmail.com>
# Jonhnny Weslley <jw@jonhnnyweslley.net>
# nickl- <github@jigsoft.co.za>
# Leila Muhtasib <muhtasib@gmail.com>


# Merge commits from src-branch into the current branch as a single commit
$ git squash fixed-cursor-styling
$ git squash fixed-cursor-styling "Fixed cursor styling"
$ git squash 95b7c52
$ git squash HEAD~3
$ git squash HEAD~3 "Work on a feature"




# Current branch name in automation-friendly format
$ egit branch-name
# main

# Delete all local branches that have been merged into HEAD
$ egit delete-local-merged

# Show files being ignored by git in the repo
$ egit ignored


Index

Command Action
add-submodule Add submodule to repository.
add-username-remote Adds a remote for the current repository for the given github username.
alias Define, search and show aliases.
apush-submodules Amend current changes and push all submodules.
apush Amend current changes and push (inc. submodules).
archive-file Export the current HEAD of the git repository to an archive.
attic Displays a list of deleted files in your repo. The output is designed to be copy and pasted Pass the second field to git show to display the file contents, or just select the hash without to see the commit where removal happened.
authors Generate authors report.
big-file Show files in the repo larger than a threshold size.
branch-name Prints the current branch name in automation-friendly format.
branch-rebaser Kicks off an interactive rebase of all the commits on your branch. Including pushed commits, so be careful.
branches ## Source: git-extra-commands.
browse View the web page for the current repository.
brv List branches sorted by their last commit date.
bulk Run git commands on multiple repositories.
change-author Change one author/email in the history to another.
changelog Generate a changelog report.
changes List authors in the repo in descending commit-count order.
checkout-pr Check out a PR locally.
churn Show which files are getting changed most often in the repository.
clear-soft Soft clean up a repository.
clear Rigorously clean up a repository.
clone-subset Uses git clone and git filter-branch to remove from the clone all files but the ones requested, along with their associated commit history.
coauthor Add a co-author to the last commit.
comma Adds and commits a file in one command.
commit-count ## Source: git-extra-commands.
commits-per-day ## Source: git-extra-commands.
commits-since Show commit logs since some date.
compact ## Source: git-extra-commands.
conflicts Show files with conflicts.
contrib Show user's contributions.
copy-branch-name Copy the current branch's name to the clipboard (macOS Only).
count Show commit count.
cp Copy a file keeping its history.
cpush-submodules Commit current changes and push all submodules.
cpush Commit current changes and push (inc. submodules).
create-branch Create branches.
credit Quicker way to assign credit to another author on the latest commit.
current-branch Prints the name of the current branch, mainly useful in automation scripts.
cut-branch Create a new branch pointed at HEAD and reset the current branch to the head of its tracking branch.
delete-branch Delete branches.
delete-local-merged Delete all local branches that have been merged into HEAD.
delete-merged-branches Delete merged branches.
delete-submodule Delete submodules.
delete-tag Delete tags.
delta Lists changed files.
diff-last Show the last change made to a file in the repository.
divergence Shows differences between local branch and its tracking branch.
edit-conflicts Edit the files that are marked as conflicted during a merge/rebase in your EDITOR/VISUAL.
effort Show effort statistics on file(s).
feature Create/Merge feature branch.
find-dirty ## Source: git-extra-commands.
flush Compact your reposistory by dropping all reflogs, stashes, and other cruft that may be bloating your pack files.
force-clone overwrite local repositories with clone.
force-mtimes Sets mtimes of all files in the reprository their last change date based on git's log. Useful to avoid too new dates after a checkout confusing make or rake.
forest Prints a text-based tree visualisation of your repository. Requires Git.pm(https//metacpan.org/release/Git).
fork Fork a repo on github.
fresh-branch Create fresh branches.
functionlog Allows you to get a log of a particular function, not a file.
gh-pages Create the GitHub Pages branch.
git Typing git git foo will make git do a git foo instead of complaining.
github-open ##.
gitlab-mr Open a merge request on GitLab.
graft Merge and destroy a given branch.
guilt calculate change between two revisions.
help Print usage details of a command.
history-eraser ## Source: git-extra-commands.
history-graph Pretty git log, single line per commit, with branch graphign.
ignore-io Get sample gitignore file.
ignore Add .gitignore patterns.
ignored Show files being ignored by git in the repo.
improved-merge Sophisticated git merge with integrated CI check and automatic cleanup.
incoming Show commits in the tracking branch that are not in the local branch.
info Returns information on current repository.
init-submodules Initialize all submodules.
lines Gives you a list of author names with the number of lines last updated by that user in files in the current directory tree with the extension specified.
local-commits List local commits.
lock Lock a file excluded from version control.
locked ls files that have been locked.
ls-object-refs Find references to an object with SHA1 in refs, commits, and trees. All of them.
mark-all-resolved ## Source: git-extra-commands.
maxpack Compress a repo's pack files as much as possible.
merge-into Merge one branch into another.
merge-repo Merge two repo histories.
missing Show commits missing from another branch.
move-commits git move-commits num-commits correct-branch moves the last n commits to correct-branch (creating it if necessary).
mr Checks out a merge request locally.
name Get name of repository from URL.
neck Show commits from the HEAD until the first branching point. Companion script for git-trail.
nuke-untracked-files ## Source: git-extra-commands.
nuke Nukes a branch locally and on the origin remote.
object-deflate Deflate an loose object file and write to standard output.
obliterate rewrite past commits to remove some files.
outgoing Show commits that are on the local branch that have not been pushed to the tracking branch.
overwritten Aggregates git blame information about original owners of lines changed or removed in the 'base..head' diff.
paste Send patches to pastebin for chat conversations.
pie-ify git pie-ify pattern replacement.
plotrepo Uses dot to draw a graph of the repository.
pr Checks out a pull request locally.
promote Promotes a local topic branch to a remote tracking branch of the same name.
prune-branches Deletes each fully merged branch after prompting for confirmation, than asks if you want the deleted branches deleted from your upstream remotes.
pruneall Prune branches from specified remotes, or all remotes when no remote is specified.
psykorebase Rebase a branch with a merge commit.
publish git publish remote remote-branch.
pull-request Create pull request for GitHub project.
purge-from-history Permanently delete files or folders from your git repository.
pylint Runs pylint on any .py files modified or added in the git status output.
rank-contributors Rummages through the changelog and orders contributors by the size of the diffs they're responsible for.
reauthor Rewrite history to change author's identity.
rebase-authors Adds authorship info to interactive git rebase output.
rebase-patch Rebases a patch.
rebase-theirs Resolve rebase conflicts by favoring 'theirs' version.
rebase-work-in-progress ## Source: git-extra-commands.
recently-checkedout-branches Shows timestamp and name of recently checked-out branches in reverse chronological order.
ref-recent Shows the date, branch name, commit hash, and commit subject of branches, from most recently modified to oldest branches.
rel Shows the relationship between the current branch and ref. With no ref, the current branch's remote tracking branch is used.
related Show other files that often get changed in commits that touch file.
release Commit, tag and push changes to the repository.
remote-default-branch Shows the default branch for a specified remote, defaults to origin when no remote is specified.
rename-branch rename local branch and push to remote.
rename-branches Rename multiple branches that start with a given name.
rename-remote Rename a remote.
rename-tag Rename a tag.
repl git read-eval-print-loop.
reset-file Reset one file.
reset-with-fire Hard reset the working directory, then zap any files not known to git.
restore-mtime Change mtime of files based on commit date of last change.
rm-deleted-from-repo Removes files you deleted with rm from the repo for you.
root-directory Prints the path to the root of the git repository you're in.
root show path of root.
roots Show the root commits.
rscp ## Source: git-extras.
run-command-on-revisions Runs a given command over a range of Git revisions.
scp Copy files to SSH compatible git-remote.
sed replace patterns in git-controlled files.
setup Set up a git repository.
shamend Amends your staged changes as a fixup (keeping the pre-existing commit message) to the specified commit, or HEAD if no revision is specified.
show-merged-branches Show merged branches.
show-overwritten Aggregates git blame information about the original owners of lines changed or removed in the 'base..head' diff.
show-tree show branch tree of commit history.
show-unmerged-branches Show unmerged branches.
shrink-repo Shrinks your clone of a git repo.
sp Simple push, single short command to commit, and push. Use -a flag to add all files to commit.
squash Import changes from a branch.
sr Use fzf to switch to a different git ref.
stamp Stamp the last commit message.
standup Recall the commit history.
stashes ## Source: git-extra-commands.
submodule-rm Allows you to remove a submodule easily with git submodule-rm path/to/submodule.
summary Show repository summary.
switch-branch Make it easier to switch to a branch by a substring of its name. More useful if you are good about deleting branches which have been merged upstream and if your branch names include unique identifiers like ticket/issue numbers or feature names.
sync Sync local branch with remote branch.
tag-and-sign Create and sign a new tag.
taglist ## Source: git-extra-commands.
tags ## Source: git-extra-commands.
thanks List the contributors to a repository in descending commit order, even if their contribution has been completely replaced.
touch Touch and add file to the index.
track Sets up your branch to track a remote branch. Assumes you mean origin/localbranchname.
trail Show all branching points in the repo's Git history so you can see how to reach commits in the current branch from other branches.
undelete Undeletes a file.
undo-push Undoes your last push to branch 1 of origin.
undo Remove latest commits.
unlock ## Source: git-extras.
unpushed-stat ## Source: git-extra-commands.
unpushed Show which commits have not been pushed to the tracking branch and are safe to amend/rebase.
unreleased Shows git commits since the last tagged version.
up-old ## Source: git-extra-commands.
upstream-sync Fetches upstream/yourforkname and rebases it into your local fork, then pushes to your origin remote.
url Get full URL of repository.
utimes ## Source: git-extras.
what-the-hell-just-happened Show what just happened.
when-merged Find when a commit was merged into one or more branches.
where Shows where a particular commit falls between releases.
whoami Shows what username email you have configured for the repo you're in.
winner Shows what authors have made the most commits, both by number of commits and by number of lines changed.
wordiness Shows how wordy people's commit messages are. Useful for shaming the folks who commit atrocities like git commit -m fixup.
wtf git-wtf displays the state of your repository in a readable, easy-to-scan format. It's useful for getting a summary of how a branch relates to a remote server, and for wrangling many topic branches.
xclone Clone repository to local (inc. submodules).