Red Hat Developer Toolset 2.1 is distributed with Git 1.8.4, which provides a number of bug fixes and feature enhancements over the Red Hat Enterprise Linux system version. Below is a comprehensive list of new features in this release.
The features below have been added since the release of Git included in Red Hat Enterprise Linux 6.5.
General Changes in the Git Suite
- Git now detects the
DISCOVERY_ACROSS_FILESYSTEMenvironment variable to decide whether to stop at a filesystem boundary when looking for the.gitdirectory. - The
GIT_ASKPASSenvironment variable can now be used to tell commands from the Git suite that prompt for password to use an external program. - The contents of the
/etc/mailnamefile (if it exists) are now the default source of email hostnames for both the committer and the author. - Conflict markers in the diff3 style now have a label.
- The
core.whitespaceconfiguration variable can now use a new rule:tab-in-indent. This rule treats a tab character at the beginning of a line as an error (useful for projects with space-only indents, for example, Python projects). - The
core.eolconfiguration variable is now the end-of-line authority over the working-tree files. It accepts thelf,crlf, ornativevalues. The default is set tonative. - Git now reports any corrupt objects it finds.
- A dash (“-”) is no longer a valid character at the beginning of a branch or tag name.
- The
pager.configuration variable now allows for setting a different pager for each subcommand.subcommand - The
core.abbrevconfiguration variable can now be used to set the minimum length of abbreviated and unique object names. - Git now recognizes MATLAB function and header patterns.
- Git now supports output coloring. A large number of configuration options have been added to allow for a separate tweaking of the look of various parts of outputs.
- Git commands now ignore the
.gitmodulesfile if it is currently conflicted in a merge. - The
-ccommand line option can now be used to override a configuration option.name=value - The
core.attributesfileconfiguration variable can be set to a path of a file containing fallback default attributes. The default value is/etc/gitattributes. - A new command,
git check-ignore, has been added. The command helps to debug.gitignorefiles by showing the pattern on the basis of which individual files are included or excluded. - The Git login shell for SSH accounts can now be extended by the user's own custom commands.
- A new configuration variable,
advice.statusHints, is now available. It allows the user to disable (or enable) the hints about staging, unstaging, or adding files displayed by thegit statuscommand. - A new credential helper has been added to access the GNOME Keyring and other services. Commands using some form of authentication can now use it to communicate with external programs. Refer to
gitcredentials(7)for more information on configuring credential helpers. - Git can now be told to interpret paths literally. The
--literal-pathspecscommand line option serves that purpose. Setting theGIT_LITERAL_PATHSPECSenvironment variable to1has the same effect. - The
.gitignorefile now accepts the “**” (double asterisk) recursive glob pattern. - Regular expressions are now accepted in the
:/<string>notation. Also, the expression is no longer bound to the start of the commit log message. Note that this change is not backward compatible. - Custom messages are now issued to users who are attempting to interactively connect to the
git shellwhen the interactive access is disabled. - Git subcommands now honor the
i18n.*configuration variables when handling text. Seegit-config(1)for more information on these settings. - A considerable number of new scripts have been added to the
contrib/directory. - The
git fsckandgit prunecommands are now reporting on their progress. - The
http.useragentconfiguration variable can now be set to lie to your firewall about the client used for HTTP connections. - A new command,
git check-mailmap, has been added. It can be used to map author and committer names and email addresses to their preferred names and addresses as specified in the.mailmapfile. - Users can now switch between commits with and without a submodule without re-cloning it due to improved plumbing — the
GIT_DIRmetainformation directory for submodules is set up inside a new submodule's directory. - Whenever a date is expected as an argument, users can now specify a timezone designator format without seconds and with a colon between hours and minutes.
- The
GIT_PREFIXenvironment variable is now available in the environments of processes spawned in configuration, so that they can check where in the tree the original command was invoked. - A special path specification, “:/”, can be used to tell subcommands that work only with the current directory to work with the entire working tree.
The git am Command
- The
git amcommand now accepts patches created by Mercurial. - The
git amcommand now sanitizes occurrences of “Re:” in the subject line. - The following new command line options have been added to the
git amcommand:--exclude=path- Passed to the
git applycommand that is used in the background to apply the patch. --keep-cr- Handles lines that contain a carriage return character (CR).
The git apply Command
- The
--verbose(or-v) command line option now reports offsets in case a patch does not apply cleanly.
The git archive Command
- It is now possible to pipe the output of the
git archivecommand to thegzipcommand. Do this by passing thetar.gzortgzarguments to the--formatcommand line option or by specifying either of these arguments in thetar.configuration variable.format
The git bisect Command
- The result of the
git bisectcommand is now output as a comment in the bisect log file.
The git blame Command
- The
git blamecommand now applies the configured textconv filters whenever possible. The textconv conversion allowsgit blameto present a human-readable output even when working with binary files. - The following new command line options have been added to the
git blamecommand:--abbrev[=n]- Display
n+1 hexadecimal digits instead of the default 7+1 as the abbreviated object name. --line-porcelain- Use the easily parsable porcelain-formatted output, but show commit information for each line. This option implies the use of the
--porcelainoption. For a description of the porcelain format, seegit-blame(1). --show-email(or-e)- Display email addresses instead of author names. This option is set to
offby default.
The git branch Command
The following new command line options have been added to the
git branch command:
--edit-description- Open an editor to describe the purpose of the branch.
--list- List existing branches. The option optionally accepts a globbing pattern.
The git checkout Command
The following new command line options have been added to the
git checkout command:
-Bit- A shorter version of running
git branch -ffollowed byitgit checkout. Seeitgit-branch(1)for more information. --detachcommit- A more user-friendly equivalent of the default behavior of
git.commit --no-overwrite-ignore- Do not overwrite untracked or ignored files during a merge.
--orphannewbranch- Creates a
newbranchsimilarly to thegit checkout -bcommand but with a detached root commit.newbranch
The git check-attr Command
- The
git check-attrcommand now accepts relative paths passed from the command line. - The following new command line options have been added to the
git check-attrcommand:--all(or-a)- List all the attributes of the specified path.
--cached- Look at the
.gitattributesfile in the index, and ignore the working tree.
The git cherry-pick Command
- The
git cherry-pickcommand is now aware of commits that failed to apply. - A range of commits can now be picked.
- A custom merge strategy can now be set. See below for a description of the new
--strategycommand line option. - After resolving conflicts with
git cherry-pick -s, sign-off lines are now implicitly left untouched in the log template. - The following new command line options have been added to the
git cherry-pickcommand:--abort- Abort current operation and return to the state before the start of the sequence.
--allow-empty-message- Prevents the
git cherry-pickcommand from failing when a commit is being picked that has no log message. --continue- Continue the operation in progress. This option uses information found in the
.git/sequencerfile and can be used after conflict resolutions. --strategy=strategy- Specifies the merge strategy for three-way merges. This option should only be used once. For information about the available strategies, see
git-merge(1).
The git clean Command
- The
git cleancommand now provides an interactive mode, which can be invoked using the--interactive(or-i) command line option. For a description of subcommands available in the interactive mode, seegit-clean(1). - A new command line option,
--exclude=(orpattern-e), has been added. This option allows the user to define rules that specify which files to ignore (in addition to what is defined in thepattern.gitignoreandfiles).GIT_DIR/info/exclude
The git clone Command
- A new command line option,
--config(orkey=value-c), is now available. This option sets the specified configuration variable to be in effect at the time of the initial checkout. The syntax expected is the same as what is used with thekey=valuegit configcommand.
The git commit Command
- The
git commitcommand now accepts arguments in the form of relative paths that point outside of the current directory. - Aborting interactive mode (initialized by the
--interactivecommand line option) now discards all changes that were made in it. - It is now possible to set the
commit.cleanupconfiguration variable towhitespace, which is equivalent to running thegit commitcommand with the--cleanup=command line option. For a description of all available cleanup modes, seewhitespacegit-commit(1). - The following new command line options have been added to the
git commitcommand:--fixup=commit- Prefix the commit line with “fixup! ”. This option is used when running the
git rebase --autosquashcommand. --gpg-sign[=(orkeyid]-S[keyid]- Sign the commit using the specified GPG key.
--no-edit- Do not launch an editor for the commit message. When used with the
--amendcommand line option, it only updates the commit tree, not the commit message. --patch(or-p)- Select patch hunks for committing using the interactive interface. Refer to
git-add(1)for more information about the interactive mode. --squash=commit- Prefix the commit line with “squash! ”. This option is used when running the
git rebase --autosquashcommand.
The git count-objects Command
- The verbose output, invoked by passing the
--verbose(or-v) command line option to thegit count-objectscommand, now reports on various garbage in the.gitdirectory. Refer togit-count-objects(1)for a more detailed description of the verbose output. - A new command line option,
--human-readable(or-H), has been added. This option makesgit count-objectsshow sizes in a human-readable format.
The git cvsimport Command
- A new command line option,
-R, has been added togit cvsimport. This option creates a mapping between CVS revisions and Git commits. - Users of the
git cvsimportcommand can now use the following configuration variables to enable certain command line options by default:Configuration Variable Command Line Option Description cvsimport.authorsFiles-Afile_nameMaps CVS user names to full names and email addresses. cvsimport.ignorePaths-Sregular_expressionSkips paths that match a certain regular expression. cvsimport.mergeRegex-Mregular_expressionParses commit messages in order to detect merge commits. cvsimport.trackRevisions-RCreates a mapping between CVS revisions and Git commits.
The git cvsserver Command
- The
git cvsservercan now use pserver to offer CVS access. Refer togit-cvsserver(1)for information on how to configure this.
The git daemon Command
- The
git daemonserver can now listen on multiple addresses. - The daemon now allows for external hooks via the
--access-hook=command line option. This option executes an external command specified bypathpathevery time a client connects to the daemon.
The git describe Command
- A new command line option,
--first-parent, has been added. This option instructs thegit describecommand to only follow the first parent commit in case of merge commits.
The git diff Command
- The
--submodulecommand line option is now able to notice ‘dirty’ submodules. These are submodules that contain modified or untracked files. - The regular expression for function headers now detects visibility modifiers (public, private, or protected) in the PHP5 programming languages.
- Functions and subroutines of the Fortran, Pascal, and Perl programming languages are now recognized.
- A new configuration variable,
diff.submodule, is now available for setting the default format used for showing differences in submodules using the--submodulecommand line option. The option can have two values:logorshort. For a detailed description of the two values, seegit-diff(1). The default value isshort. - A new configuration variable,
diff.noprefix, is now available for setting an implicit behavior identical to what the--no-prefixcommand line option does. If set, no source or destination prefix is shown. - A new configuration variable,
diff.context, is now available for setting the number of lines shown above and below the modified line or lines. The default value is3. The--unified(or-U) option overrides this setting. - A new configuration variable,
diff.algorithm, is now available. This variable can be used to specify the algorithm used to display thegit diffoutput. It accepts the following arguments:defaultormyers,minimal,patience, andhistogram. For a description of the different algorithms, refer togit-diff(1). The default value isdefaultormyers. - A new configuration variable,
diff.ignoresubmodules, is now available. This variable can be used to ignore submodules when generating diffs. - The following new command line options have been added to the
git diffcommand:--function-context(or-W)- Displays entire functions in the context of changes.
--histogram- Generates output using the histogram algorithm. This algorithm supports low-occurrence common elements and offers better performance than the default.
--ignore-blank-lines- Tells
git diffto ignore changes that consist only of additions or removals of blank lines. --minimal- Generates output using the minimal algorithm. This algorithm attempts to minimize the output at the cost of extra time spent.
--stat-count- Limits the length of output to the number of lines specified by the option. Lines exceeding the limit are substituted with “...”.
--word-diff=mode- Shows added or removed words. This option accepts
color,plain,porcelain, andnoneas modes. For a description of the available modes, refer togit-diff(1). The default isplain.
The git fetch Command
- The
git fetchcommand now honors thetransfer.fsckobjectsconfiguration variable. If set, the command validates received objects. - A new command line option,
--recurse-submodules[=, has been added. This option controls whether to fetch new commits from submodules too. This option accepts theargument]yes,no, oron-demandarguments. If passed without an argument, it assumesyes. For a description of the arguments, seegit-fetch(1).
The git format-patch Command
- The
git format-patchcommand now accepts the--subject-prefixcommand line option with no argument. This option substitutes the standard “[PATCH]” prefix in the subject line with a new prefix (or none) specified on the command line. - The
format.coverLetterconfiguration variable may now be used to turn the--cover-lettercommand line optiononoroff. Theformat.coverLettermay further be set toautoto only be used with sets of two or more commits. - The following new command line options have been added to the
git format-patchcommand:--from[=whom]- Set the “From: ” field to the specified person. Not to be used when preparing patches for the
git send-mailcommand. Seegit-format-patch(1)for more information about the behavior of this option. --notes[=ref]- Add notes to the formatted patch. Refer to
git-notes(1)for more information on the way Git handles these notes. --[no-]signature- Alter the email signature used in the output messages. The
format.signatureconfiguration variable can be used to set the default signature. When neither the command line option nor the configuration variable is specified, the Git version number is used as the signature. The--no-signaturevariant of the option can be used to prevent the inclusion of any signature. --quiet(or-q)- Do not show the names of the generated patch files.
--reroll-count=(orn-v)n- Output a set of patches with the
nversion string prepended to their names and the version mentioned in the subject.
The git for-each-ref Command
- The
git for-each-refcommand now recognizes the following new fields for extracting values from referenced objects into the resulting output:%(symref),%(symref:short),%(flag),%(objectname:short),%(contents:subject),%(contents:body), and%(contents:signature).
The git grep Command
- Functions and subroutines of the Fortran, Pascal, and Perl programming languages are now recognized.
- It is now possible to pass the
-(dash) argument to the-fcommand line option to instruct it to read patterns from the standard input. - The following new command line options have been added to the
git grepcommand:--break- Delimit matches from different files with an empty line.
--color=[when]- Color the matches returned by
git grep. This option accepts theauto,always, orneverarguments. The default setting isalways. --exclude-standard- Do not search in files listed in the
.gitignorefile when using the--no-indexoption. --function-context(or-W)- Show the entire function in which the match was found.
--heading- Print the filename above the matches from that file instead of showing the file information for each match separately.
--no-index- In the current directory, search also for matches in files that are not managed by Git.
--open-files-in-pager [(orpager]-O [)pager]- Instructs
git grepto open files with matching regular expressions in the user's pager or editor of choice. -P- Instructs
git grepto expect and accept Perl-compatible regular expressions. --untracked- In the current tree, search in both tracked and untracked files.
The git hash-object Command
- The
--stdin-pathscommand line option can now be used together with the--no-filteroption. This results in thegit hash-objectcommand reading filenames from the standard input and hashing the contents as is — disregarding any filters that may have been applied by the attributes mechanism.
The git help Command
- The
--web(or-w) command line option now works with the Chrome and Chromium web browsers. The default web browser can be specified using thehelp.browserorweb.browserconfiguration variables. If none of these variables is defined, thegit web--browsescript attempts to choose a browser automatically. - A new command line option,
--guides(or-g), has been added. This option shows a list of useful guides.
The git imap-send Command
- The
git imap-sendcommand now supports CRAM-MD5 as a valid method for authentication with an IMAP server.
The git init Command
- A new configuration variable,
init.templatedir, is now recognized. Similarly to the--templatecommand line option and theGIT_TEMPLATE_DIRenvironment variable, it specifies the directory containing files and directories that will be copied to the.gitdirectory (orGIT_DIR). - A new command line option,
--separate-git-dir=, has been added. This option forcesgitdirectorygit initto initialize the repository in the specified location. A symbolic link is created in place of the.gitdirectory, pointing to the separately placed repository.
The git log Command
- The
--followcommand line option now follows copies as well as renames when listing the history of a file. - The
git logcommands are now able to interpret paths specified using globs. - The
--format=option is now able to interpret theformat%g[nNeE]specifiers when showing information from reflogs. For a description of the specifiers, seegit-log(1). - The
--decoratecommand line option now shows commit information in colors. It is now also capable of highlighting grafted and replaced commits. - The following new command line options have been added to the
git logcommand:--author-date-order- Sort the commits listed based on the author timestamp. No parents are shown before all of their children are listed.
--cherry- Display two diverged branches, and omit any changes they share. This is equivalent to the following combination of options:
--right-only --cherry-mark --no-merges. --cherry-mark- Display two diverged branches, and mark any changes they share with the “=” (equal sign) character.
--children- List also the children of commits.
-Gpattern- Only match changes that contain
pattern. --grep-reflog=pattern- Limit the output to commits whose reflog messages match
pattern. If multiple--grep-reflogoptions are used, commits with reflog messages matching any of the patterns specified are listed. This option should only be used together with the--walk-reflogsoption. -Lstart,end:file- Show the changes that the line specified by the range within the
filewent through. Either end of the range may be specified by absolute line numbers or regular expressions. The end of the range may also be an offset that specifies a number of lines before or afterstart. --notes- Replaces the
--show-notesoption. This option shows the notes annotating the commits (commit log messages). --show-signature- Pass the signature of a commit object to the
gpg --verifycommand to check its validity, and show the output. --use-mailmap- Rewrite the names and email addresses of committers in the output using the
mailmapfile.
The git ls-remote Command
- A new command line option,
--exit-code, has been added. This option returns 2 as the command's exit code when no matching remote refs are found. - A new command line option,
--help, has been added. This option displays basic information about the syntax and options of thegit ls-remotecommand.
The git merge Command
- The
--log[command line option may now be optionally given a numeric parameter. The parameter specifies the number of commits merged from which one-line descriptions will be used in the log message in addition to branch names.n] - It is now possible to use the
git merge -command, where-(dash) denotes the name of the previous branch. - The
merge.ffconfiguration variable can now be set toyes,no, oronlyto specify the default behaviour, which corresponds to the--ff,--no-ff, and--ff-onlycommand line options respectively. For a description of these options, seegit-merge(1). - The following new command line options have been added to the
git mergecommand:--abort- Abort the current conflict-resolution process, and attempt to go back to the pre-merge state. It may not be possible to go back if there were uncommitted changes when the merge was started.
--edit(or-e)- Open an editor to edit the automatically generated merge message before committing a successful merge.
--no-overwrite-ignore- Do not overwrite untracked or ignored files during a merge.
--[no-]verify-signature- Verify the GPG signatures of the commits that are being merged. Abort the merge if the verification fails. The
--no-verify-signaturevariant of the option instructs thegit mergecommand not to verify commit signatures.
The git mergetool Command
- The
git mergetoolcommand now instructs thevimorgvimeditors to show the three-way diff by default. The old behavior can be achieved by specifyingvimdiff2orgvimdiff2as the tool to be used.
The git merge-base Command
- A new command line option,
--is-ancestor, has been added. This option returns the 0 exit status code if the firstcommitcommitcommitis an ancestor of the secondcommitand 1 if not.
The git merge-file Command
- A custom conflict-marker size can now be used. The custom size can be set using the
--marker-sizecommand line option or theconflict-marker-sizeconfiguration attribute. - The union merge behaviour can now be used. This means that
git merge-fileresolves conflicts by concatenating lines from both sides of the merge.
The git notes Command
- A new subcommand,
git notes merge, is now available. This subcommand attempts to merge notes accompanying the specified object into the current notes ref.
The git notes prune Subcommand
The following new command line options have been added to the
git notes prune subcommand:
--dry-run(or-n)- Does not remove anything. Instead, it only lists the names of objects whose notes would be pruned.
--verbose(or-v)- Makes the
prunesubcommand provide more information when merging notes and report all names of objects whose notes are removed during the pruning.
The git pull Command
- The
git pullcommand can now pull an annotated or signed tag instead of a branch tip. The GPG signature of the tag is then made a part of the merge commit. - The
pull.rebaseconfiguration variable is now recognized. It makesgit pullact as if the--rebasecommand line option was passed. The variable serves as a fallback setting in case the per-branchbranch.variable is not set. Note that this may be a potentially dangerous setting. Refer toname.rebasegit-rebase(1)for more information about rebasing and togit-config(1)for a description of thepull.rebasevariable. - The
--verbose(or-v) and--quiet(or-q) command line options are now passed along to thegit rebasecommand whengit pull --rebaseis run or when the correspondingbranch.configuration variable is set.name.rebase - A new command line option,
--[no-]verify-signature, has been added. This option verifies the GPG signatures of the commits that are being merged and aborts the merge if the verification fails. The--no-verify-signaturevariant of the option instructs thegit pullcommand not to verify the GPG signatures of the commits.
The git push Command
- A new “pre-push” hook is available. If the hook exits with a non-zero status code, it will prevent the
git pushcommand from performing any operations. To enable the hook, pass the--verifycommand line option togit push. Use the--no-verifyoption to bypass the hook. For a more detailed description of the hook, refer togithooks(5). - The
--force(or-f) command line option is now required for updating remote tags. Note that forcing a push can result in a loss of commits in the remote repository if not used with care. For a more detailed description of this option, refer togit-push(1). - The
push.defaultconfiguration variable has a new valid value ofupstream, which is synonymous to the now deprecatedtrackingvalue. For a description of the availablepush.defaultvalues, refer togit-config(1). - The following new command line options have been added to the
git pushcommand:--follow-tags- Push annotated tags plus all the refs that would be pushed normally.
--recurse-submodules=check|on-demand- Do not push if any submodule is ahead of its remote HEAD. See
git-push(1)for an explanation of the two possible arguments.
The git read-tree Command
- A new command line option,
--dry-run(or-n), has been added. This option checks if a merge would complete without errors when thegit read-treecommand is passed the-moption.
The git rebase Command
- The
rebase.autosquashconfiguration option is now honored by thegit rebase --interactivecommand. The--interactive(or-o) command line option prepares a list of the commits to be rebased and lets the user modify that list before the rebasing takes place. - The
git rebasecommand now updates reflog for HEAD even when it finishes normally or is ended with the--abortcommand line option. - It is now possible to pass SHA-1 hashes as object names when using the
--autosquashcommand line option. - The
--strategy-option=(oroption-X) command line option can now be used along with theoption--strategy=(orstrategy-s) option to pass options to the selected merge strategy. Refer tostrategygit-rebase(1)for a description of the available strategies. - The following new command line options have been added to the
git rebasecommand:--edit-todo- Edit the instructions in an editor when using the interactive mode (invoked by the
--interactive(or-i) option). --[no-]autostash- Temporarily stash uncomitted changes before the rebasing begins instead of refusing to run. The
--no-autostashvariant of the option may be used to prevent autostashing when therebase.autostashconfiguration variable is set.
The git remote Command
- A new subcommand,
git remote set-branches, is available. This subcommand modifies the list of branches tracked by the specified remote.
The git replace Command
- The
--delete(or-d) command line option now interprets itsobjectargument as the extended SHA-1 syntax. Theobjectmay now be specified, for example, asHEAD~.NUM
The git rerere Command
- A new subcommand,
git rerere remaining, is now available. It displays conflicts that have not been automatically resolved. This includes paths that thegit rererecommand cannot track, such as submodules. - The
git rerere forgetsubcommand now requires a path to be specified where any conflict resolutions are to be reset.
The git reset Command
- A new command line option,
--keep, has been added. This option discards index entries and commits in the working tree but preserves local changes.
The git revert Command
- A new command line option,
--strategy=, has been added. This option specifies the merge strategy for three-way merges. This option should only be used once. For information about the available strategies, seestrategygit-merge(1).
The git send-email Command
- The
git send-emailcommand is now able to parse and use the “To:” field from its input files. - The value of the
sendemail.aliasfileconfiguration variable may now begin with the “~” (tilde) character to denote the user's home directory. - The
sendemail.annotateconfiguration variable may now be used to set the default behavior that is otherwise controlled by the--annotatecommand line option. If set totrue, each patch that is about to be sent is offered for review and editing. - Patches sent with the
--in-reply-tocommand line option are now replies to the new cover letter that begins the new thread. - The following new command line options have been added to the
git send-emailcommand:--help(or-h)- Display basic information about the syntax and options of the
git send-emailcommand. --to-cmd=command- This option is similar to the
--cc-cmd=option and can be used to read the list of recipients from the output of thecommandcommand.
The git show Command
- The
git show --do-walk -command now has a more compact equivalent,ngit show -. Refer tongit-rev-list(1)for more information on object traversal. - The
--no-patchcommand line option is a new synonym for the-soption. This option suppresses diff output. It can also be used to cancel the effect of the--patchoption.
The git show-ref Command
- The
--headcommand line option now always means the “HEAD” reference, regardless of filtering.
The git stash Command
- A new command line option,
--include-untracked(or-u), has been added. This option stashes untracked files as well, which allows for them to be cleaned later by thegit cleancommand.
The git status Command
- The
git statuscommand now detects submodules with uncommitted local changes in their working tree. - Users can now change the value of the
status.shortconfiguration variable totrueto configure thegit statuscommand to use the--shortcommand line option by default. Similarly, it is now possible to change the value of thestatus.branchconfiguration variable totrueto rungit statuswith the--branchoption by default. - The following new command line options have been added to the
git statuscommand:--branch(or-b)- Displays the name of the current branch even when the
--short(or-s) option is used. --ignore-submodules[=condition]- This option accepts
none,untracked,dirty, orallas an optional argument and can be used to ignore certain changes to submodules. --ignored- Displays ignored files.
The git submodule Command
- Users are now allowed to create shallow clones of submodule repositories.
- Users can now run
git submodulecommands from any part of the working tree. - The
git submodule synccommand now also updates information for submodules that have not been checked out. - The
git submodule updatecommand no longer terminates immediately when it encounters an error. Instead, it updates the remaining registered submodules and displays the error message on exit. - The
git submodule updatecommand can now be configured to execute an arbitrary shell command. To enable this behavior for a particular submodule, change the value of thesubmodule.configuration variable to any shell command that accepts exactly one command line argument.submodule_name.update - Users can now set the value of the
submodule.configuration variable tosubmodule_name.updatenoneto prevent a particular submodule from being updated by default. - A new command,
git submodule deinit, has been added. This command unregisters selected submodules and serves as a counterpart to thegit submodule initcommand. - A new command line option,
--force(or-f), has been added togit submodule. This option can be used to discard local changes. - A new command line option,
--name, has been added togit submodule. This option can be used to specify the name of a new submodule. - It is now possible to apply the
--recursivecommand line option to thesynccommand ofgit submodule. This option makessynctraverse nested submodules recursively.
The git tag Command
- A new command line option,
--cleanup=, has been added. This option controls the way whitespace is handled in tag messages. It accepts themodeverbatim,whitespace, orstriparguments. Seegit-tag(1)for a description of what the available modes do.
The gitweb Interface
- The configuration of the gitweb interface can now be changed after each request.
- The
/etc/gitweb-common.confconfiguration file is now read if it exists. - The gitweb interface is now able to show diffs.
Other new subcommands and exotic option combinations
The following subcommands and exotic option combinations have been added:
git remote -tbranch--mirror=fetch- This is now a legal combination of options as the mirroring in the
fetchmode no longer mirrors everything. git rev-listA..B--ancestry-path- The newly available
--ancestry-pathoption excludes commits that are not descendants of commitA. git rev-list --count --cherry-mark- This combination now produces a more useful output as it counts the cherry-picked commits separately.