@noindent
where @var{user} is your login name on Savannah.
-If you have not already done so, you should generate and upload a SSH
-key: open @uref{https://savannah.gnu.org/my/} in your browser, then go to
-@q{Preferences} then to something like @q{Edit SSH Keys}, and follow
-the instructions on that page.
+If you have not already done so, you should generate and upload a
+SSH key: open @uref{https://savannah.gnu.org/my/} in your browser,
+go to @q{Account Configuration}, then to something like
+@q{Edit SSH Keys}, and follow the instructions on that page.
You may then:
git push origin
@end example
+Note that recent versions of Git (Git 1.6.3 or later) will issue a
+big warning if the above command is used. The simplest solution
+is to add a new section to @file{.git/config} that looks like
+this:
+
+@example
+[push]
+ default = matching
+@end example
+
+@noindent
+Then @code{git push origin} will work as before. For more
+details, consult the @code{git push} man page.
+
+
@node Advanced git stuff
@section Advanced git stuff
* Working on LilyPond sources with several branches::
* Git log::
* Applying git patches::
+* Reverting all local changes::
@end menu
repository.
-
@node Git log
@subsection Git log
@warning{The @code{gitk} command may require a separate @code{gitk} package,
available in the appropriate distribution's repositories.}
+
@node Applying git patches
@subsection Applying git patches
-Well-formed git patches should be committed with
+Well-formed git patches created with @code{git format-patch}
+should be committed with the following command:
@example
-git am
+git am @var{patch}
@end example
-Patches created without @code{git format-patch} should be
-committed with
+Patches created without @code{git format-patch} can be applied in
+two steps. The first step is to apply the patch to the working
+tree:
@example
-git apply
+git apply @var{patch}
@end example
+@noindent
+The second step is to commit the changes and give credit to the
+author of the patch. This can be done with the following command:
+
+@example
+git commit -a --author="First Last <user@@example.net>"
+@end example
+
+
+@node Reverting all local changes
+@subsection Reverting all local changes
+
+Sometimes git will become hopelessly confused, and you just want
+to get back to a known, stable state. This command destroys any
+local changes you have made, but at least you get back to the
+current online version:
+
+@example
+git reset --hard origin/master
+@end example
@node Git on Windows