This patch adds a tip explaining `git help -g`. That command will
list a collection of useful guides that come "pre-built" with Git,
e.g. `git help workflows` and `git help revisions`. These are useful
resources for learning and looking-up common Git concepts and
techniques, and that broad usefulness is the justification for placing
the tip near the very top of the list.
Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>
This tip shows how to display the most recent tag reachable on the
current branch. The use of `--abbrev=0` is necessary otherwise the
output would contain additional information (specifically part of a
commit hash), appended to the tag name. It's worth noting that this
command is usable for branches other than the current one, e.g.
$ git describe --tags --abbrev=0 master
That would show the most recent tag on the `master` branch regardless
of whatever branch the user is currently on.
Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>
This patch adds the command `git help everyday`, which shows a
man-page that comes with Git describing the most common commands for
everyday usage. The tip is specifically at the top of the list on the
grounds that it is the fastest way to find help for performing basic
operations in Git, which is very useful to people new to Git.
Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>
The command in this tip avoids showing merge commits because sometimes
developers will merge `master` into their feature branch in the course
of development, especially when that feature is in development for a
long time. This tip focuses on showing only those commits which
introduce new changes and ignores those merge commits for this reason.
It also displays the commits in reverse chronological order, oldest to
newest, so that the output shows the development of a feature branch
in "historical" order.
Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>
This is useful for when you realize that you forgot to mention
something important, made a typo, etc. Obviously you should avoid
using this on a commit which you have already pushed.
Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>
This tip shows how to list all ignored files in a project, which will
take into account not only any `.gitignore` file within a repository,
but also any globally defined list of exclusions such as
`/home/eric/.gitexcludes` and `.git/info/exclude` within the
repository itself.
Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>
Since 2010 Git supports the `--delete` argument for git-push as an
alias for the `:branch` syntax, i.e. these commands are equivalent:
$ git push origin :foo
$ git push origin --delete foo
This patch changes the tip to use the `--delete` argument on the
grounds that it is easier to remember, easier to understand, and
easily available since it is unlikely for people to be using a version
of Git which is more than five years old.
Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>