OnWorks favicon

git-sh - Online in the Cloud

Run git-sh in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command git-sh that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



git-sh -- a git shell




git-sh starts an interactive bash(1) session modified for git-heavy workflows. Typical
usage is to change into the directory of a git work tree or bare repository and run the
git-sh command to start an interactive shell session.

Top-level command aliases are created for all core git(1) subcommands, git-sh builtin
aliases (see BUILTIN ALIASES), and git command aliases defined in ~/.gitconfig.


git-sh loads a set of standard aliases in addition to all core git commands. The builtin
aliases are overridden by aliases defined in the user or system gitconfig files.

a git add

b git branch

c git checkout

d git diff

f git fetch --prune

k git cherry-pick

l git log --pretty=oneline --abbrev-commit

n git commit --verbose --amend

r git remote

s git commit --dry-run --short

t git diff --cached

The Staging Area
a git add

aa git add --update (mnemonic: "add all")

stage git add

ap git add --patch

p git diff --cached (mnemonic: "patch")

ps git diff --cached --stat (mnemonic: "patch stat")

git reset HEAD

Commits and Commit History
ci git commit --verbose

ca git commit --verbose --all

amend git commit --verbose --amend

n git commit --verbose --amend

k git cherry-pick

re git rebase --interactive

pop git reset --soft HEAD^

peek git log -p --max-count=1

Fetching and Pulling
f git fetch

pm git pull (mnemonic: "pull merge")

pr git pull --rebase (mnemonic: "pull rebase")

Miscellaneous Commands
d git diff

ds git diff --stat (mnemonic: "diff stat")

hard git reset --hard

soft git reset --soft

scrap git checkout HEAD


Anything defined in the [alias] section of the repository, user, or system git config
files are also available as top-level shell commands. Assuming a ~/.gitconfig that looked
like this:

ci = commit --verbose
ca = commit -a
d = diff
s = status
thanks = !git-thanks

\... you might then have the following shell session:

master!something> echo "stuff" >somefile
master!something*> s
M somefile
master!something*> d
diff --git a/somefile b/somefile
-- a/somefile
++ b/somefile
@@ -0,0 +1 @@
+ stuff
master!something*> ca -m "add stuff"
master!something> thanks HEAD

The default prompt shows the current branch, a bang (!), and then the relative path to the
current working directory from the root of the work tree. If the work tree includes
modified files that have not yet been staged, a dirty status indicator (*) is also

The git-sh prompt includes ANSI colors when the git color.ui option is set and enabled. To
enable git-sh's prompt colors explicitly, set the color.sh config value to auto:

$ git config --global color.sh auto

Customize prompt colors by setting the color.sh.branch, color.sh.workdir, and
color.sh.dirty git config values:

$ git config --global color.sh.branch 'yellow reverse'
$ git config --global color.sh.workdir 'blue bold'
$ git config --global color.sh.dirty 'red'

See colors in git for information.


Bash completion support is automatically enabled for all git built-in commands and also
for aliases defined in the user ~/.gitconfig file. The auto-completion logic is smart
enough to know an alias d that expands to git-diff should use the same completion
configuration as the git-diff command.

The completion code is a slightly modified version of the git bash completion script
shipped with the core git distribution. The script is built into thegit-sh executable at
compile time and need not be obtained or installed separately.


Most git-sh behavior can be configured by editing the user or system gitconfig files
(~/.gitconfig and /etc/gitconfig) either by hand or using git-config(1). The [alias]
section is used to create basic command aliases.

The /etc/gitshrc and ~/.gitshrc files are sourced (in that order) immediately before the
shell becomes interactive.

The ~/.bashrc file is sourced before either /etc/gitshrc or ~/.gitshrc. Any bash
customizations defined there and not explicitly overridden by git-sh are also available.


PS1 Set to the dynamic git-sh prompt. This can be customized in the ~/.gitshrc or
/etc/gitshrc files.

Explicitly set the path to the git repository instead of assuming the nearest .git

Explicitly set the path to the root of the work tree instead of assuming the
nearest parent directory with a .git repository.

Use git-sh online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    itop - ITSM  CMDB OpenSource
    itop - ITSM CMDB OpenSource
    IT Operations Portal: a complete open
    source, ITIL, web based service
    management tool including a fully
    customizable CMDB, a helpdesk system and
    a document man...
    Download itop - ITSM CMDB OpenSource
  • 2
    Clementine is a multi-platform music
    player and library organizer inspired by
    Amarok 1.4. It has a fast and
    easy-to-use interface, and allows you to
    search and ...
    Download Clementine
  • 3
    ATTENTION: Cumulative update 2.4.3 has
    been released!! The update works for any
    previous 2.x.x version. If upgrading
    from version v1.x.x, please download and
    Download XISMuS
  • 4
    Modular headtracking program that
    supports multiple face-trackers, filters
    and game-protocols. Among the trackers
    are the SM FaceAPI, AIC Inertial Head
    Tracker ...
    Download facetracknoir
  • 5
    Weaviate in a nutshell: Weaviate is a
    vector search engine and vector
    database. Weaviate uses machine learning
    to vectorize and store data, and to find
    Download Weaviate
  • 6
    PHP QR Code
    PHP QR Code
    PHP QR Code is open source (LGPL)
    library for generating QR Code,
    2-dimensional barcode. Based on
    libqrencode C library, provides API for
    creating QR Code barc...
    Download PHP QR Code
  • 7
    Cuckoo Sandbox
    Cuckoo Sandbox
    Cuckoo Sandbox uses components to
    monitor the behavior of malware in a
    Sandbox environment; isolated from the
    rest of the system. It offers automated
    analysis o...
    Download Cuckoo Sandbox
  • More »

Linux commands