Socket
Socket
Sign inDemoInstall

extra-git

Package Overview
Dependencies
0
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    extra-git

Common utility commands for Git repositories.


Version published
Weekly downloads
409
increased by1473.08%
Maintainers
1
Install size
449 kB
Created
Weekly downloads
 

Readme

Source

Common utility commands for Git repositories.
:package: NPM, :smiley_cat: GitHub, :scroll: Files, :blue_book: 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

CommandAction
add-submoduleAdd submodule to repository.
add-username-remoteAdds a remote for the current repository for the given github username.
aliasDefine, search and show aliases.
apush-submodulesAmend current changes and push all submodules.
apushAmend current changes and push (inc. submodules).
archive-fileExport the current HEAD of the git repository to an archive.
atticDisplays 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.
authorsGenerate authors report.
big-fileShow files in the repo larger than a threshold size.
branch-namePrints the current branch name in automation-friendly format.
branch-rebaserKicks off an interactive rebase of all the commits on your branch. Including pushed commits, so be careful.
branches## Source: git-extra-commands.
browseView the web page for the current repository.
brvList branches sorted by their last commit date.
bulkRun git commands on multiple repositories.
change-authorChange one author/email in the history to another.
changelogGenerate a changelog report.
changesList authors in the repo in descending commit-count order.
checkout-prCheck out a PR locally.
churnShow which files are getting changed most often in the repository.
clear-softSoft clean up a repository.
clearRigorously clean up a repository.
clone-subsetUses git clone and git filter-branch to remove from the clone all files but the ones requested, along with their associated commit history.
coauthorAdd a co-author to the last commit.
commaAdds and commits a file in one command.
commit-count## Source: git-extra-commands.
commits-per-day## Source: git-extra-commands.
commits-sinceShow commit logs since some date.
compact## Source: git-extra-commands.
conflictsShow files with conflicts.
contribShow user's contributions.
copy-branch-nameCopy the current branch's name to the clipboard (macOS Only).
countShow commit count.
cpCopy a file keeping its history.
cpush-submodulesCommit current changes and push all submodules.
cpushCommit current changes and push (inc. submodules).
create-branchCreate branches.
creditQuicker way to assign credit to another author on the latest commit.
current-branchPrints the name of the current branch, mainly useful in automation scripts.
cut-branchCreate a new branch pointed at HEAD and reset the current branch to the head of its tracking branch.
delete-branchDelete branches.
delete-local-mergedDelete all local branches that have been merged into HEAD.
delete-merged-branchesDelete merged branches.
delete-submoduleDelete submodules.
delete-tagDelete tags.
deltaLists changed files.
diff-lastShow the last change made to a file in the repository.
divergenceShows differences between local branch and its tracking branch.
edit-conflictsEdit the files that are marked as conflicted during a merge/rebase in your EDITOR/VISUAL.
effortShow effort statistics on file(s).
featureCreate/Merge feature branch.
find-dirty## Source: git-extra-commands.
flushCompact your reposistory by dropping all reflogs, stashes, and other cruft that may be bloating your pack files.
force-cloneoverwrite local repositories with clone.
force-mtimesSets 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.
forestPrints a text-based tree visualisation of your repository. Requires Git.pm(https//metacpan.org/release/Git).
forkFork a repo on github.
fresh-branchCreate fresh branches.
functionlogAllows you to get a log of a particular function, not a file.
gh-pagesCreate the GitHub Pages branch.
gitTyping git git foo will make git do a git foo instead of complaining.
github-open##.
gitlab-mrOpen a merge request on GitLab.
graftMerge and destroy a given branch.
guiltcalculate change between two revisions.
helpPrint usage details of a command.
history-eraser## Source: git-extra-commands.
history-graphPretty git log, single line per commit, with branch graphign.
ignore-ioGet sample gitignore file.
ignoreAdd .gitignore patterns.
ignoredShow files being ignored by git in the repo.
improved-mergeSophisticated git merge with integrated CI check and automatic cleanup.
incomingShow commits in the tracking branch that are not in the local branch.
infoReturns information on current repository.
init-submodulesInitialize all submodules.
linesGives 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-commitsList local commits.
lockLock a file excluded from version control.
lockedls files that have been locked.
ls-object-refsFind references to an object with SHA1 in refs, commits, and trees. All of them.
mark-all-resolved## Source: git-extra-commands.
maxpackCompress a repo's pack files as much as possible.
merge-intoMerge one branch into another.
merge-repoMerge two repo histories.
missingShow commits missing from another branch.
move-commitsgit move-commits num-commits correct-branch moves the last n commits to correct-branch (creating it if necessary).
mrChecks out a merge request locally.
nameGet name of repository from URL.
neckShow commits from the HEAD until the first branching point. Companion script for git-trail.
nuke-untracked-files## Source: git-extra-commands.
nukeNukes a branch locally and on the origin remote.
object-deflateDeflate an loose object file and write to standard output.
obliteraterewrite past commits to remove some files.
outgoingShow commits that are on the local branch that have not been pushed to the tracking branch.
overwrittenAggregates git blame information about original owners of lines changed or removed in the 'base..head' diff.
pasteSend patches to pastebin for chat conversations.
pie-ifygit pie-ify pattern replacement.
plotrepoUses dot to draw a graph of the repository.
prChecks out a pull request locally.
promotePromotes a local topic branch to a remote tracking branch of the same name.
prune-branchesDeletes each fully merged branch after prompting for confirmation, than asks if you want the deleted branches deleted from your upstream remotes.
pruneallPrune branches from specified remotes, or all remotes when no remote is specified.
psykorebaseRebase a branch with a merge commit.
publishgit publish remote remote-branch.
pull-requestCreate pull request for GitHub project.
purge-from-historyPermanently delete files or folders from your git repository.
pylintRuns pylint on any .py files modified or added in the git status output.
rank-contributorsRummages through the changelog and orders contributors by the size of the diffs they're responsible for.
reauthorRewrite history to change author's identity.
rebase-authorsAdds authorship info to interactive git rebase output.
rebase-patchRebases a patch.
rebase-theirsResolve rebase conflicts by favoring 'theirs' version.
rebase-work-in-progress## Source: git-extra-commands.
recently-checkedout-branchesShows timestamp and name of recently checked-out branches in reverse chronological order.
ref-recentShows the date, branch name, commit hash, and commit subject of branches, from most recently modified to oldest branches.
relShows the relationship between the current branch and ref. With no ref, the current branch's remote tracking branch is used.
relatedShow other files that often get changed in commits that touch file.
releaseCommit, tag and push changes to the repository.
remote-default-branchShows the default branch for a specified remote, defaults to origin when no remote is specified.
rename-branchrename local branch and push to remote.
rename-branchesRename multiple branches that start with a given name.
rename-remoteRename a remote.
rename-tagRename a tag.
replgit read-eval-print-loop.
reset-fileReset one file.
reset-with-fireHard reset the working directory, then zap any files not known to git.
restore-mtimeChange mtime of files based on commit date of last change.
rm-deleted-from-repoRemoves files you deleted with rm from the repo for you.
root-directoryPrints the path to the root of the git repository you're in.
rootshow path of root.
rootsShow the root commits.
rscp## Source: git-extras.
run-command-on-revisionsRuns a given command over a range of Git revisions.
scpCopy files to SSH compatible git-remote.
sedreplace patterns in git-controlled files.
setupSet up a git repository.
shamendAmends 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-branchesShow merged branches.
show-overwrittenAggregates git blame information about the original owners of lines changed or removed in the 'base..head' diff.
show-treeshow branch tree of commit history.
show-unmerged-branchesShow unmerged branches.
shrink-repoShrinks your clone of a git repo.
spSimple push, single short command to commit, and push. Use -a flag to add all files to commit.
squashImport changes from a branch.
srUse fzf to switch to a different git ref.
stampStamp the last commit message.
standupRecall the commit history.
stashes## Source: git-extra-commands.
submodule-rmAllows you to remove a submodule easily with git submodule-rm path/to/submodule.
summaryShow repository summary.
switch-branchMake 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.
syncSync local branch with remote branch.
tag-and-signCreate and sign a new tag.
taglist## Source: git-extra-commands.
tags## Source: git-extra-commands.
thanksList the contributors to a repository in descending commit order, even if their contribution has been completely replaced.
touchTouch and add file to the index.
trackSets up your branch to track a remote branch. Assumes you mean origin/localbranchname.
trailShow all branching points in the repo's Git history so you can see how to reach commits in the current branch from other branches.
undeleteUndeletes a file.
undo-pushUndoes your last push to branch 1 of origin.
undoRemove latest commits.
unlock## Source: git-extras.
unpushed-stat## Source: git-extra-commands.
unpushedShow which commits have not been pushed to the tracking branch and are safe to amend/rebase.
unreleasedShows git commits since the last tagged version.
up-old## Source: git-extra-commands.
upstream-syncFetches upstream/yourforkname and rebases it into your local fork, then pushes to your origin remote.
urlGet full URL of repository.
utimes## Source: git-extras.
what-the-hell-just-happenedShow what just happened.
when-mergedFind when a commit was merged into one or more branches.
whereShows where a particular commit falls between releases.
whoamiShows what username email you have configured for the repo you're in.
winnerShows what authors have made the most commits, both by number of commits and by number of lines changed.
wordinessShows how wordy people's commit messages are. Useful for shaming the folks who commit atrocities like git commit -m fixup.
wtfgit-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.
xcloneClone repository to local (inc. submodules).


Keywords

FAQs

Last updated on 12 Apr 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc