]> git.phdru.name Git - git-wiki.git/blobdiff - git-wiki.txt
Add GitAhead
[git-wiki.git] / git-wiki.txt
index c1a831a94c77c0e585be299e52e07c0bb879e8db..cdab2370dfdced86afe66a300f91781057bfb0c9 100644 (file)
@@ -49,11 +49,13 @@ many different languages. Download Russian translation from `GArik
 `Git Buch <http://gitbu.ch/index.html>`_ (German).
 
 
-Offline documentation
----------------------
+Builtin help
+------------
 
-Git has builtin help: run ``git help $TOPIC``. For example, run
-``git help git`` or ``git help help``.
+Run ``git help $TOPIC``. For example, run ``git help git`` or
+``git help help``. Run ``git help -a`` to list help topics for all
+available commands; ``git help -g`` to list help guides, i.e. help topics
+that aren't commands.
 
 
 Quick start
@@ -79,6 +81,9 @@ install git with `Homebrew <http://brew.sh/>`_: ``brew install git``.
 <https://github.com/git-cola/git-cola>`__) is a Git GUI written in
 Python and GPL licensed. Linux, Windows, MacOS X.
 
+`GitAhead <https://gitahead.com/>`_ is a completely free and open source
+graphical Git client for Linux, Windows and macOS.
+
 `TortoiseGit <https://tortoisegit.org/>`_ is a Windows Shell Interface
 to Git based on TortoiseSVN; open source.
 
@@ -779,6 +784,32 @@ bit slow::
     com = !git ci
 
 
+Literal expansion
+'''''''''''''''''
+
+Git interprets aliases literally. I.e., when expanding an alias git just
+does simple textual substitution. That could be a surprise if an alias
+is passed parameters on the command line. For example, the following
+alias works without parameters -- it pushes configured branch(es) to all
+configured remotes::
+
+    [alias]
+    push-to-all-remotes = !git remote | xargs -n1 git push
+
+But it doesn't work if a user wants to provide a list of branches to
+push: the command ``git push-to-all-remotes master`` is expanded by git
+as ``!git remote | xargs -n1 git push master`` which is certainly not
+what the user wants -- remote's name must comes first, before branches.
+This is a fix::
+
+    [alias]
+    push-to-all-remotes = !git remote | xargs -I% -n1 git push %
+
+Then the command ``git push-to-all-remotes master`` is expanded by git
+as ``!git remote | xargs -I% -n1 git push % master``; xargs substitutes
+``%`` with remote's name.
+
+
 Root
 ----
 
@@ -995,7 +1026,7 @@ Web interface to browse repositories can be created using `gitweb
 <http://git.zx2c4.com/cgit/about/>`_. Both are CGI scripts (written in
 Perl and C). In addition to web interface both provide read-only dumb
 http access for git (http(s):// URLs). `Klaus
-<https://pypi.python.org/pypi/klaus>`_ is a small and simple WSGI web
+<https://pypi.org/project/klaus/>`_ is a small and simple WSGI web
 server that implements both web interface and git smart HTTP
 transport; supports Python 2 and Python 3, performs syntax
 highlighting.