![]() shows commits that touch the specified paths, and diffs about the same specified paths. Use mailmap file to map author and committer names and email addresses to canonical real names and email addresses. Print out the ref name given on the command line by which each commit was reached. This option is assumed if the config value log.initialDecorationSet is set to all. When specified, this option clears all previous -decorate-refs or -decorate-refs-exclude options and relaxes the default decoration filter to include all references. If none of these options or config settings are given, then references are used as decoration if they match HEAD, refs/heads/, refs/remotes/, refs/stash/, or refs/tags/. The log.excludeDecoration config option allows excluding refs from the decorations, but an explicit -decorate-refs pattern will override a match in log.excludeDecoration. decorate-refs=, -decorate-refs-exclude=įor each candidate reference, do not use it for decoration if it matches any patterns given to -decorate-refs-exclude or if it doesn’t match any of the patterns given to -decorate-refs. Default to configuration value of log.decorate if configured, otherwise, auto. The option -decorate is short-hand for -decorate=short. If auto is specified, then if the output is going to a terminal, the ref names are shown as if short were given, otherwise no ref names are shown. If full is specified, the full ref name (including prefix) will be printed. If short is specified, the ref name prefixes refs/heads/, refs/tags/ and refs/remotes/ will not be printed. Print out the ref names of any commits that are shown. Options -followĬontinue listing the history of a file beyond renames (works only for a single file). The command takes options applicable to the git-rev-list(1) command to control what is shown and how, and options applicable to the git-diff(1) command to control how the changes each commit introduces are shown. The following two commands are equivalent: $ git log A B -not $(git merge-base -all A B) The resulting set of commits is the symmetric difference between the two operands. For example, either of the following may be used interchangeably: $ git log origin.HEADĪnother special notation is ". Means "list all the commits which are reachable from foo or bar, but not from baz".Ī special notation ". Thus, the following command: $ git log foo bar ^baz Various other options and paths parameters can be used to further limit the result. ![]() The remaining commits are what comes out in the command’s output. Commits reachable from any of the commits given on the command line form a set, and then commits reachable from any of the ones given with ^ in front are subtracted from that set. You can think of this as a set operation. The output is given in reverse chronological order by default. List commits that are reachable by following the parent links from the given commit(s), but exclude commits that are reachable from the one(s) given with a ^ in front of them. Show commits between two dates (yyyy-mm-dd): git log -before=" " -after=" ".Show the last N commits from a certain author: git log -n number -author= author.Show only commits whose messages include a given string (case-insensitively): git log -i -grep search_string.Show a graph of all commits, tags and branches in the entire repo: git log -oneline -decorate -all -graph.Show a graph of commits in the current branch using only the first line of each commit message: git log -oneline -graph. ![]() Show an overview of which file(s) changed in each commit: git log -stat.Show the history of a particular file or directory, including differences: git log -p path/to/file_or_directory.Show the sequence of commits starting from the current one, in reverse chronological order of the Git repository in the current working directory: git log.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |