"git add -N path…" adds the named paths as an empty blob, so that subsequent "git diff" will show a diff as if they are creation events.
"git checkout --ours/--theirs" can be used to check out one side of a conflicting merge during conflict resolution
"git checkout -m" can be used to recreate the initial conflicted state during conflict resolution.
"git diff" learned "textconv" filters —
"git log" learned "--source" to show what ref each commit was reached from.
refs/replace/ hierarchy is designed to be usable as a replacement of the "grafts" mechanism, with the added advantage that it can be transferred across repositories.
"git checkout", "git reset" and "git stash" learned to pick and choose to use selected changes you made, similar to "git add -p”.
"git clone" learned --recursive option.
"git upload-pack", which is the server side support for "git clone" and "git fetch", can call a new post-upload-pack hook for statistics purposes.
"git fetch" over http learned a new mode that is different from the traditional "dumb commit walker”.
"git checkout frotz” insanity - we should check my advanced git slides for stuff like this
"git diff" learned --submodule option to show a list of one-line logs instead of differences between the commit object names.
"git fetch" learned --all and --multiple options, to run fetch from many repositories, and --prune option to remove remote tracking branches that went stale. These make "git remote update" and "git remote prune" less necessary (there is no plan to remove "remote update" nor "remote prune", though).
"git grep" can use -F (fixed strings) and -i (ignore case) together.
"git notes" command to annotate existing commits.
"git merge" (and "git pull") learned --ff-only option to make it fail if the merge does not result in a fast-forward.
"git rebase -i" learned "reword" that acts like "edit" but immediately starts an editor to tweak the log message without returning control to the shell, which is done by "edit" to give an opportunity to tweak the contents.
"sparse checkout" feature allows only part of the work tree to be checked out.
HTTP transfer can use authentication scheme other than basic (i.e./e.g. digest).
A new syntax "<branch>@{upstream}" can be used on the command line to substitute the name of the "upstream" of the branch. Missing branch defaults to the current branch, so "git fetch && git merge @{upstream}" will be equivalent to "git pull”.
"git branch --set-upstream" can be used to update the (surprise!) upstream, i.e. where the branch is supposed to pull and merge from (or rebase onto).
"git commit --date='<date>'" can be used to override the author date just like "git commit --author='<name> <email>'" can be used to override the author identity.
"git fetch --all" can now be used in place of "git remote update”.
"git push" learned "git push origin --delete branch", a syntactic sugar for "git push origin :branch”.
"git rebase --onto A…B" means the history is replayed on top of the merge base between A and B.
"git rebase -i" also learned --autosquash option that is useful together with the new "fixup" action.
Use of "git reset --merge" has become easier when resetting away a conflicted mess left in the work tree.
"git status" learned "-s(hort)" output format.
"git for-each-ref" learned %(symref), %(symref:short) and %(flag) tokens.
"git notes" command has been rewritten in C and learned many commands and features to help you carry notes forward across rebases and amends.
"git status" notices and describes dirty submodules.
"git checkout --orphan newbranch" is similar to "-b newbranch" but prepares to create a root commit that is not connected to any existing commit.
"git cherry-pick" learned to pick a range of commits (e.g. "cherry-pick A..B" and "cherry-pick --stdin"), so did "git revert"; these do not support the nicer sequencing control "rebase [-i]" has, though.
"git remote" learned "set-branches" subcommand.
"git status -s -b" shows the current branch in the output.
"git checkout -B <it>" is a shorter way to say "git branch -f <it>" followed by "git checkout <it>”.
"git commit" learned the --fixup and --squash options to help later invocation of interactive rebase.
"git fetch" learned the "--recurse-submodules" option.
"git log -G<pattern>" limits the output to commits whose change has added or deleted lines that match the given pattern.
"git merge --log" used to limit the resulting merge log to 20 entries; this is now customizable by giving e.g. "--log=47”
"git merge" learned the "--abort" option, synonymous to "git reset --merge" when a merge is in progress.
"git notes" learned the "merge" subcommand to merge notes refs. In addition to the default manual conflict resolution, there are also several notes merge strategies for automatically resolving notes merge conflicts.
The codebase is getting prepared for i18n/l10n; no translated strings nor translation mechanism in the code yet, but the strings are being marked for l10n.
"git checkout --detach <commit>" is a more user friendly synonym for "git checkout <commit>^0”.
"git fetch" can be told to recursively fetch submodules on-demand.
Various git-svn updates.
"git blame" learned "--line-porcelain" that is less efficient but is easier to parse.
"git commit" learned a "--patch" option to directly jump to the per-hunk selection UI of the interactive mode.
"git grep" learned the "-P" option to take pcre regular expressions.
"git log" and friends learned a new "--notes" option to replace the "--show-notes" option. Unlike "--show-notes", "--notes=<ref>" does not imply showing the default notes.
"git merge" uses "merge.ff" configuration variable to decide to always create a merge commit (i.e. --no-ff, aka merge.ff=no), refuse to create a merge commit (i.e. --ff-only, aka merge.ff=only). Setting merge.ff=yes (or not setting it at all) restores the default behaviour of allowing fast-forward to happen when possible.
"git submodule update" learned "--force" option to get rid of local changes in submodules and replace them with the up-to-date version.
Various updates to git-p4 (in contrib/), fast-import, and git-svn.
"git grep" learned "--break" and "--heading" options, to let users mimic the output format of "ack".
The "--decorate" option to "git log" and its family learned to highlight grafted and replaced commits.
"git stash" learned an "--include-untracked option".
"git push" can be told with the "--recurse-submodules=check" option to refuse pushing of the supermodule, if any of its submodules' commits hasn’t been pushed out to their remotes.
"git fetch" learned to honor transfer.fsckobjects configuration to validate the objects that were received from the other end, just like "git receive-pack" (the receiving end of "git push") does.
The code to handle username/password for HTTP transactions used in "git push" & "git fetch" learned to talk "credential API" to external programs to cache or store them, to allow integration with platform native keychain mechanisms.
Git uses gettext to translate its most common interface messages into the user’s language if translations are available and the locale is appropriately set. Distributors can drop new PO files in po/ to add new translations.
"git checkout -B <current branch> <elsewhere>" is a more intuitive way to spell "git reset --keep <elsewhere>”.
"git commit" learned "-S" to GPG-sign the commit; this can be shown with the "--show-signature" option to "git log”.
"git branch --edit-description" can be used to add descriptive text to explain what a topic branch is about.
"git fmt-merge-msg" learned to take the branch description into account when preparing a merge summary that "git merge" records when merging a local branch.
"git request-pull" has been updated to convey more information useful for integrators to decide if a topic is worth merging and what is pulled is indeed what the requestor asked to pull,
When you do not tell which branches and tags to push to the "git push" command in any way, the command used "matching refs" rule to update remote branches and tags with branches and tags with the same name you locally have. In future versions of Git, this will change to push out only your current branch according to either the "upstream" or the "current" rule. Although "upstream" may be more powerful once the user understands Git better, the semantics "current" gives is simpler and easier to understand for beginners and may be a safer and better default option. We haven’t decided yet which one to switch to.
A content filter (clean/smudge) used to be just a way to make the recorded contents "more useful", and allowed to fail; a filter can now optionally be marked as "required".
"git merge" in an interactive session learned to spawn the editor by default to let the user edit the auto-generated merge message, to encourage people to explain their merges better. Legacy scripts can export GIT_MERGE_AUTOEDIT=no to retain the historical behavior. Both "git merge" and "git pull" can be given --no-edit from the command line to accept the auto-generated merge message.
"git push" learned the "--prune" option, similar to "git fetch".
The whole directory that houses a top-level superproject managed by "git submodule" can be moved to another place.
HTTP transport learned to authenticate with a proxy if needed.
A new mode for push, "simple", which is a cross between "current" and "upstream", has been introduced. "git push" without any refspec will push the current branch out to the same name at the remote repository only when it is set to track the branch with the same name over there. The plan is to make this mode the new default value when push.default is not configured.
A third-party tool "git subtree" is distributed in contrib/
A remote helper that acts as a proxy and caches ssl session for the https:// transport is added to the contrib/ area.
"git push --recurse-submodules" learned to optionally look into the histories of submodules bound to the superproject and push them out.
An experimental "version 4" format of the index file has been introduced to reduce on-disk footprint and I/O overhead.
Scripted Porcelain writers now have access to the credential API via the "git credential" plumbing command.
"git clone --local $path" started its life as an experiment to optionally use link/copy when cloning a repository on the disk, but we didn’t deprecate it after we made the option a no-op to always use the optimization. The command learned "--no-local" option to turn this off, as a more explicit alternative over use of file:// URL.
"git help -w $cmd" can show HTML version of documentation for "git-$cmd" by setting help.htmlpath to somewhere other than the default location where the build procedure installs them locally; the variable can even point at a http:// URL. (interesting, should test setting this up for git-scm)
A credential helper for Win32 to allow access to the keychain of the logged-in user has been added.
A credential helper to allow access to the Gnome keyring has been added.
When "git checkout" checks out a branch, it tells the user how far behind (or ahead) the new branch is relative to the remote tracking branch it builds upon. The message now also advises how to sync them up by pushing or pulling. This can be disabled with the advice.statusHints configuration variable.
"git submodule sync" learned the "--recursive" option.
"diff.submodule" configuration variable can be used to give custom default value to the "git diff --submodule" option.
Mention of "GIT/Git/git" in the documentation have been updated to be more uniform and consistent. The name of the system and the concept it embodies is "Git"; the command the users type is "git". All-caps "GIT" was merely a way to imitate "Git" typeset in small caps in our ASCII text only documentation and to be avoided.
The patterns in .gitignore and .gitattributes files can have /, as a pattern that matches 0 or more levels of subdirectory. E.g. "foo//bar" matches "bar" in "foo" itself or in a subdirectory of "foo”.
"git add -u" and "git add -A" without pathspec issues warning to make users aware that they are only operating on paths inside the subdirectory they are in. Use ":/" (everything from the top) or "." (everything from the $cwd) to disambiguate.
"git cherry-pick" can be used to replay a root commit to an unborn branch.
"git format-patch" learned "-v $count" option, and prepends a string "v$count-" to the names of its output files, and also automatically sets the subject prefix to "PATCH v$count". This allows patches from rerolled series to be stored under different names and makes it easier to reuse cover letter messages.
"git push" will stop without doing anything if the new "pre-push" hook exists and exits with a failure.
A triangular "pull from one place, push to another place" workflow is supported better by new remote.pushdefault (overrides the "origin" thing) and branch..pushremote (overrides the branch..remote) configuration variables.
A new read-only credential helper (in contrib/) to interact with the .netrc/.authinfo files has been added.
There was no Porcelain way to say "I no longer am interested in this submodule", once you express your interest in a submodule with "submodule init". "submodule deinit" is the way to do so.
"git merge" and "git pull" can optionally be told to inspect and reject when merging a commit that does not carry a trusted GPG signature.
In Git 2.0, "git add <path>" will behave as "git add -A <path>", so that "git add dir/" will notice paths you removed from the directory and record the removal. Versions before Git 2.0, including this release, will keep ignoring removals, but the users who rely on this behaviour are encouraged to start using "git add --ignore-removal <path>" now before 2.0 is released.
The credential helper to talk to keychain on OS X (in contrib/) has been updated to kick in not just when talking http/https but also imap(s) and smtp.
Also in contrib/ is a new "contacts" script that runs "git blame" to find out the people who may be interested in a set of changes.
"git clean" command learned an interactive mode.
"git check-mailmap" is a new command that lets you map usernames and e-mail addresses through the mailmap mechanism, just like many built-in commands do.
In addition to the choice from "rebase, merge, or checkout-detach", "submodule update" can allow a custom command to be used in to update the working tree of submodules via the "submodule.*.update" configuration variable.
"git submodule update" can optionally clone the submodule repositories shallowly.
git status" learned status.branch and status.short configuration variables to use --branch and --short options by default (override with --no-branch and --no-short options from the command line).
"git rebase" learned "--[no-]autostash" option to save local changes instead of refusing to run (to which people’s normal response was to stash them and re-run). This introduced a corner case breakage to "git am --abort" but it has been fixed.
"git log -L<line>,<range>:<filename>" has been added. This may still have leaks and rough edges, though.
The default prefix for "git svn" will change in Git 2.0. For a long time, "git svn" created its remote-tracking branches directly under refs/remotes, but it will place them under refs/remotes/origin/ unless it is told otherwise with its --prefix option.
Instead of typing four capital letters "HEAD", you can say "@" now, e.g. "git log @“.
"git replace" helper no longer allows an object to be replaced with another object of a different type to avoid confusion (you can still manually craft such a replacement using "git update-ref", as an escape hatch).
Just like "git checkout -" knows to check out, and "git merge -" knows to merge, the branch you were previously on, "git cherry-pick" now understands "git cherry-pick -" to pick from the previous branch.
Magic pathspecs like ":(icase)makefile" (matches both Makefile and makefile) and ":(glob)foo/**/bar" (matches "bar" in "foo" and any subdirectory of "foo") can be used in more places.
The "http.*" variables can now be specified for individual URLs. For example.
[http]
sslVerify = true
[http "https://weak.example.com/"]
sslVerify = false
"git blame" can now take more than one -L option to discover the origin of multiple blocks of lines.
The http transport clients can optionally ask to save cookies with the http.savecookies configuration variable.
"git fetch" (hence "git pull" as well) learned to check "fetch.prune" and "remote.*.prune" configuration variables and to behave as if the "--prune" command line option was given.
Note
|
This is from the 1.9-rc2 announcement. |
Foreign interfaces, subsystems and ports.
-
The HTTP transport, when talking GSS-Negotiate, uses "100 Continue" response to avoid having to rewind and resend a large payload, which may not be always doable.
-
Various bugfixes to remote-bzr and remote-hg (in contrib/).
-
The build procedure is aware of MirBSD now.
-
Various "git p4", "git svn" and "gitk" updates.
UI, Workflows & Features
-
Fetching from a shallowly-cloned repository used to be forbidden, primarily because the codepaths involved were not carefully vetted and we did not bother supporting such usage. This release attempts to allow object transfer out of a shallowly-cloned repository in a more controlled way (i.e. the receiver becomes a shallow repository with a truncated history).
-
Just like we give a reasonable default for "less" via the LESS environment variable, we now specify a reasonable default for "lv" via the "LV" environment variable when spawning the pager.
-
Two-level configuration variable names in "branch." and "remote." hierarchies, whose variables are predominantly three-level, were not completed by hitting a <TAB> in bash and zsh completions.
-
Fetching a 'frotz' branch with "git fetch", while a 'frotz/nitfol' remote-tracking branch from an earlier fetch was still there, would error out, primarily because the command was not told that it is allowed to lose any information on our side. "git fetch --prune" now can be used to remove 'frotz/nitfol' to make room for fetching and storing the 'frotz' remote-tracking branch.
-
"diff.orderfile=<file>" configuration variable can be used to pretend as if the "-O<file>" option were given from the command line of "git diff", etc.
-
The negative pathspec syntax allows "git log — . ':!dir'" to tell us "I am interested in everything but 'dir' directory".
-
"git difftool" shows how many different paths there are in total, and how many of them have been shown so far, to indicate progress.
-
"git push origin master" used to push our 'master' branch to update the 'master' branch at the 'origin' repository. This has been enhanced to use the same ref mapping "git push origin" would use to determine what ref at the 'origin' to be updated with our 'master'. For example, with this configuration
[remote "origin"] push = refs/heads/*:refs/review/*
that would cause "git push origin" to push out our local branches to corresponding refs under refs/review/ hierarchy at 'origin', "git push origin master" would update 'refs/review/master' over there. Alternatively, if push.default is set to 'upstream' and our 'master' is set to integrate with 'topic' from the 'origin' branch, running "git push origin" while on our 'master' would update their 'topic' branch, and running "git push origin master" while on any of our branches does the same.
-
"gitweb" learned to treat ref hierarchies other than refs/heads as if they are additional branch namespaces (e.g. refs/changes/ in Gerrit).
-
"git for-each-ref --format=…" learned a few formatting directives; e.g. "%(color:red)%(HEAD)%(color:reset) %(refname:short) %(subject)".
-
The command string given to "git submodule foreach" is passed directly to the shell, without being eval’ed. This is a backward incompatible change that may break existing users.
-
"git log" and friends learned the "--exclude=<glob>" option, to allow people to say "list history of all branches except those that match this pattern" with "git log --exclude='/' --branches".
-
"git rev-parse --parseopt" learned a new "--stuck-long" option to help scripts parse options with an optional parameter.
-
The "--tags" option to "git fetch" no longer tells the command to fetch only the tags. It instead fetches tags in addition to what are fetched by the same command line without the option.
Performance, Internal Implementation, etc.
-
When parsing a 40-hex string into the object name, the string is checked to see if it can be interpreted as a ref so that a warning can be given for ambiguity. The code kicked in even when the core.warnambiguousrefs is set to false to squelch this warning, in which case the cycles spent to look at the ref namespace were an expensive no-op, as the result was discarded without being used.
-
The naming convention of the packfiles has been updated; it used to be based on the enumeration of names of the objects that are contained in the pack, but now it also depends on how the packed result is represented---packing the same set of objects using different settings (or delta order) would produce a pack with different name.
-
"git diff --no-index" mode used to unnecessarily attempt to read the index when there is one.
-
The deprecated parse-options macro OPT_BOOLEAN has been removed; use OPT_BOOL or OPT_COUNTUP in new code.
-
A few duplicate implementations of prefix/suffix string comparison functions have been unified to starts_with() and ends_with().
-
The new PERLLIB_EXTRA makefile variable can be used to specify additional directories Perl modules (e.g. the ones necessary to run git-svn) are installed on the platform when building.
-
"git merge-base" learned the "--fork-point" mode, that implements the same logic used in "git pull --rebase" to find a suitable fork point out of the reflog entries for the remote-tracking branch the work has been based on. "git rebase" has the same logic that can be triggered with the "--fork-point" option.
-
A third-party "receive-pack" (the responder to "git push") can advertise the "no-thin" capability to tell "git push" not to use the thin-pack optimization. Our receive-pack has always been capable of accepting and fattening a thin-pack, and will continue not to ask "git push" to use a non-thin pack.
Also contains various documentation updates and code clean-ups.
Note
|
This is from the 1.9-rc2 announcement. |
"push.default"'s default changed to "simple" (was "matching").
"add -u" and "add -A" now behave like "add -a" when invoked inside a subdirectory.
"git add <path>" now behaves like "git add -A <path>", so "git add dir/" will notice files removed from that directory and record the removal.
"git svn" now stores its branches in refs/remotes/origin (they were just under refs/remotes).