<https://git-scm.com/download/linux>`_.
Microsoft Windows: download `git-for-windows
-<https://github.com/git-for-windows/git/releases>`_ or `msysGit
-<https://github.com/msysgit/msysgit/releases>`_.
+<https://github.com/git-for-windows/git/releases>`_.
MacOS X: use git installed with `XCode
-<https://developer.apple.com/xcode/downloads/>`_ or download from
-`MacPorts <https://www.macports.org/ports.php?by=name&substr=git>`_ or
+<https://developer.apple.com/xcode/>`_ or download from `MacPorts
+<https://www.macports.org/ports.php?by=name&substr=git>`_ or
`git-osx-installer
<http://sourceforge.net/projects/git-osx-installer/files/>`_ or
install git with `Homebrew <http://brew.sh/>`_: ``brew install git``.
-`git-cola <https://git-cola.github.io/index.html>`_ is a Git GUI
-written in Python and GPL licensed. Linux, Windows, MacOS X.
+`git-cola <https://git-cola.github.io/index.html>`_ (`repository
+<https://github.com/git-cola/git-cola>`_) is a Git GUI written in
+Python and GPL licensed. Linux, Windows, MacOS X.
`TortoiseGit <https://tortoisegit.org/>`_ is a Windows Shell Interface
to Git based on TortoiseSVN; open source.
original commit but preserve two commits created in the current branch
do something like::
- $ git branch save-master # create a new branch saving master
- $ git reflog # find the original place of master
+ $ git branch save-master # create a new branch saving master
+ $ git reflog # find the original place of master
$ git reset $COMMIT_ID
$ git cherry-pick save-master~ save-master
- $ git branch -D save-master # remove temporary branch
+ $ git branch -D save-master # remove temporary branch
git revert: revert a commit
$ git check-attr -a -- \*.py
+Useful assets
+-------------
+
+`GitAlias <http://gitalias.com/>`_ (`repository
+<https://github.com/GitAlias/gitalias>`_) is a big collection of
+aliases. A careful selection of aliases for frequently used commands
+could save you a lot of keystrokes!
+
+`GitIgnore <https://www.gitignore.io/>`_ and
+https://github.com/github/gitignore are collections of ``.gitignore``
+files for all kinds of IDEs and programming languages. Python
+included!
+
+`pre-commit <http://pre-commit.com/>`_ (`repositories
+<https://github.com/pre-commit>`_) is a framework for managing and
+maintaining multi-language pre-commit hooks. The framework is written
+in Python and has a lot of plugins for many programming languages.
+
+
Advanced topics
===============
Root
-====
+----
Git switches to the root (top-level directory of the project where
``.git`` subdirectory exists) before running any command. Git
ReReRe
-======
+------
Rerere is a mechanism that helps to resolve repeated merge conflicts.
The most frequent source of recurring merge conflicts are topic
Database maintenance
-====================
+--------------------
Git object database and other files/directories under ``.git`` require
periodic maintenance and cleanup. For example, commit editing left
a program; default program for ``-O`` is a pager (usually ``less``),
but you can use your editor::
- $ git grep -Ovim # but not -O vim
+ $ git grep -Ovim # but not -O vim
BTW, if git is instructed to use ``less`` as the pager (i.e., if pager
is not configured in git at all it uses ``less`` by default, or if it
and is being used to develop some Fedora projects. `GitPrep
<http://gitprep.yukikimoto.com/>`_ is yet another Github clone,
written in Perl. `Gogs <https://gogs.io/>`_ is written in Go.
-`GitBucket <https://takezoe.github.io/gitbucket/about/>`_ is written
-in Scala.
+`GitBucket <https://gitbucket.github.io/gitbucket-news/about/>`_ is
+written in Scala.
And last but not least, `Gitlab <https://about.gitlab.com/>`_. It's
perhaps the most advanced web-based development environment for git.
To start converting your Mercurial habits to git see the page
`Mercurial for Git users
-<https://mercurial.selenic.com/wiki/GitConcepts>`_ at Mercurial wiki.
+<https://www.mercurial-scm.org/wiki/GitConcepts>`_ at Mercurial wiki.
At the second half of the page there is a table that lists
corresponding Mercurial and git commands. Should work perfectly in
both directions.