i18n: update translations for v3.4
[git-cola.git] / README.md
blob50d8348151b35c933423c59254ba091ba1031a1d
1 # git-cola: The highly caffeinated Git GUI
3     git-cola is a powerful Git GUI with a slick and intuitive user interface.
5     Copyright (C) 2007-2018, David Aguilar and contributors
7     This program is free software: you can redistribute it and/or modify
8     it under the terms of the GNU General Public License as published by
9     the Free Software Foundation, either version 2 of the License, or
10     (at your option) any later version.
12     This program is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15     GNU General Public License for more details.
17     You should have received a copy of the GNU General Public License
18     along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 ## SCREENSHOTS
22 Screenshots are available on the
23 [git-cola screenshots page](https://git-cola.github.io/screenshots.html).
25 ## DOWNLOAD
27     apt-get install git-cola
29 New releases are available on the
30 [git-cola download page](https://git-cola.github.io/downloads.html).
32 ## FORK
34     git clone git://github.com/git-cola/git-cola.git
36 [![git-cola build status](https://api.travis-ci.org/git-cola/git-cola.svg?branch=master)](https://travis-ci.org/git-cola/git-cola)
38 [git-cola on github](https://github.com/git-cola/git-cola)
40 [git-cola google group](https://groups.google.com/group/git-cola/)
43 # NUTRITIONAL FACTS
45 ## ACTIVE INGREDIENTS
47 * [git](https://git-scm.com/) 1.6.3 or newer.
49 * [Python](https://python.org/) 2.6 or newer (Python 2+3 compatible).
51 * [QtPy](https://github.com/spyder-ide/qtpy) 1.1.0 or newer.
53 * [argparse](https://pypi.python.org/pypi/argparse) 1.1 or newer.
54   argparse is part of the stdlib in Python 2.7; install argparse separately if
55   you are running on Python 2.6.
57 * [Sphinx](http://sphinx-doc.org/) for building the documentation.
59 *git-cola* uses *QtPy*, so you can choose between *PyQt4*, *PyQt5*, and
60 *PySide* by setting the `QT_API` environment variable to `pyqt4`, `pyqt5` or
61 `pyside` as desired.  `qtpy` defaults to `pyqt5` and falls back to `pyqt4`
62 if `pyqt5` is not installed.
64 Any of the following Python Qt libraries must be installed:
66 * [PyQt4](https://www.riverbankcomputing.com/software/pyqt/download)
67   4.6 or newer
69 * [PyQt5](https://www.riverbankcomputing.com/software/pyqt/download5)
70   5.2 or newer
72 * [PySide](https://github.com/PySide/PySide)
73   1.1.0 or newer
75 Set `QT_API=pyqt4` in your environment if you have both
76 versions of *PyQt* installed and want to ensure that PyQt4 is used.
78 *NOTE*: *git-cola* includes a vendored copy of its *QtPy* dependency.
80 We provide a copy of the `qtpy` module when installing *git-cola* so that you
81 are not required to install *QtPy* separately.  If you'd like to provide your
82 own `qtpy` module, for example from the `python-qtpy` Debian package, then use
83 `make NO_VENDOR_LIBS=1 ...` when invoking `make`, or export
84 `GIT_COLA_NO_VENDOR_LIBS=1` into the build environment.
86 Python3 users on debian will need to install `python3-distutils` in order
87 to run the Makefile's installation steps.  `distutils` is a Python build
88 requirement, but not needed at runtime.
91 ## ADDITIVES
93 *git-cola* enables additional features when the following
94 Python modules are installed.
96 [send2trash](https://github.com/hsoft/send2trash) enables cross-platform
97 "Send to Trash" functionality.
99 # BREWING INSTRUCTIONS
101 ## RUN FROM SOURCE
103 You don't need to install *git-cola* to run it.
104 Running *git-cola* from its source tree is the easiest
105 way to try the latest version.
107     git clone git://github.com/git-cola/git-cola.git
108     cd git-cola
109     ./bin/git-cola
110     ./bin/git-dag
112 Having *git-cola*'s *bin/* directory in your path allows you to run
113 *git cola* like a regular built-in Git command:
115     # Replace "$PWD/bin" with the path to git-cola's bin/ directory
116     PATH="$PWD/bin":"$PATH"
117     export PATH
119     git cola
120     git dag
122 The instructions below assume that you have *git-cola* present in your
123 `$PATH`.  Replace "git cola" with "./bin/git-cola" as needed if you'd like to
124 just run it in-place.
126 # DOCUMENTATION
128 * [HTML documentation](https://git-cola.readthedocs.io/en/latest/)
130 * [git-cola manual](share/doc/git-cola/git-cola.rst)
132 * [git-dag manual](share/doc/git-cola/git-dag.rst)
134 * [Keyboard shortcuts](https://git-cola.github.io/share/doc/git-cola/hotkeys.html)
136 * [Contributing guidelines](CONTRIBUTING.md)
138 # INSTALLATION
140 Normally you can just do "make install" to install *git-cola*
141 in your `$HOME` directory (`$HOME/bin`, `$HOME/share`, etc).
142 If you want to do a global install you can do
144     make prefix=/usr install
146 The platform-specific installation methods below use the native
147 package manager.  You should use one of these so that all of *git-cola*'s
148 dependencies are installed.
150 Distutils is used by the `Makefile` via `setup.py` to install *git-cola* and
151 its launcher scripts.  distutils replaces the `#!/usr/bin/env python` lines in
152 scripts with the full path to python at build time, which can be undesirable
153 when the runtime python is not the same as the build-time python.  To disable
154 the replacement of the `#!/usr/bin/env python` lines, pass `USE_ENV_PYTHON=1`
155 to `make`.
157 ## LINUX
159 Linux is it! Your distro has probably already packaged git-cola.
160 If not, please file a bug against your distribution ;-)
162 ### arch
164 Available in the [AUR](https://aur.archlinux.org/packages/git-cola/).
166 ### debian, ubuntu
168     apt-get install git-cola
170 ### fedora
172     dnf install git-cola
174 ### gentoo
176     emerge git-cola
178 ## Ubuntu
180 The default version on 18.04 is older and is missing features and enhancements.
181 Use this [PPA](https://launchpad.net/~pavreh/+archive/ubuntu/git-cola)
182 maintained by @pavreh to get a newer version.
184 ## MAC OS X
186 [Homebrew](https://brew.sh/) is the easiest way to install
187 git-cola's *Qt4* and *PyQt4* dependencies.  We will use Homebrew to install
188 the git-cola recipe, but build our own .app bundle from source.
190 [Sphinx](http://sphinx-doc.org/latest/install.html) is used to build the
191 documentation.
193     brew install sphinx-doc
194     brew install git-cola
196 Once brew has installed git-cola you can:
198 1. Clone git-cola
200     `git clone git://github.com/git-cola/git-cola.git && cd git-cola`
202 2. Build the git-cola.app application bundle
204     ```
205     make \
206         PYTHON=$(brew --prefix python3)/bin/python3 \
207         PYTHON_CONFIG=$(brew --prefix python3)/bin/python3-config \
208         SPHINXBUILD=$(brew --prefix sphinx-doc)/bin/sphinx-build \
209         git-cola.app
210    ```
212 3. Copy it to _/Applications_
214     `rm -fr /Applications/git-cola.app && cp -r git-cola.app /Applications`
216 Newer versions of Homebrew install their own `python3` installation and
217 provide the `PyQt5` modules for `python3` only.  You have to use
218 `python3 ./bin/git-cola` when running from the source tree.
220 ### UPGRADING USING HOMEBREW
222 If you upgrade using `brew` then it is recommended that you re-install
223 *git-cola*'s dependencies when upgrading.  Re-installing ensures that the
224 Python modules provided by Homebrew will be properly setup.
226 This is required when upgrading to a modern (post-10.11 El Capitan) Mac OS X.
227 Homebrew now bundles its own Python3 installation instead of using the
228 system-provided default Python.
231     # update homebrew
232     brew update
234     # uninstall git-cola and its dependencies
235     brew uninstall git-cola
236     brew uninstall pyqt5
237     brew uninstall sip
239     # re-install git-cola and its dependencies
240     brew install git-cola
242 ## WINDOWS INSTALLATION
244 **IMPORTANT** If you have a 64-bit machine, install the 64-bit versions only.
245 Do not mix 32-bit and 64-bit versions.
247 Download and install the following:
249 * [Git for Windows](https://git-for-windows.github.io/)
251 * [Git Cola](https://github.com/git-cola/git-cola/releases)
253 Once these are installed you can run *git cola* from the Start menu.
255 See "WINDOWS (continued)" below for more details.
257 # GOODIES
259 *git cola* ships with an interactive rebase editor called *git-xbase*.
260 *git-xbase* is used to reorder and choose commits when rebasing.
261 Start an interactive rebase through the "Rebase" menu, or through the
262 *git cola rebase* sub-command to start the *git-xbase* editor:
264     git cola rebase origin/master
266 *git-xbase* can be launched independently of *git cola* by telling
267 `git rebase` to use it as its editor through the `GIT_SEQUENCE_EDITOR`
268 enviironment variable:
270     env GIT_SEQUENCE_EDITOR="$PWD/share/git-cola/bin/git-xbase" \
271     git rebase -i origin/master
273 # COMMAND-LINE TOOLS
275 The *git-cola* command exposes various sub-commands that allow you to quickly
276 launch tools that are available from within the *git-cola* interface.
277 For example, `./bin/git-cola find` launches the file finder,
278 and `./bin/git-cola grep` launches the grep tool.
280 See `git cola --help-commands` for the full list of commands.
282     $ git cola --help-commands
283     usage: git-cola [-h]
284     
285                     {cola,am,archive,branch,browse,config,
286                      dag,diff,fetch,find,grep,merge,pull,push,
287                      rebase,remote,search,stash,tag,version}
288                     ...
289     
290     valid commands:
291       {cola,am,archive,branch,browse,config,
292        dag,diff,fetch,find,grep,merge,pull,push,
293        rebase,remote,search,stash,tag,version}
295         cola                start git-cola
296         am                  apply patches using "git am"
297         archive             save an archive
298         branch              create a branch
299         browse              browse repository
300         config              edit configuration
301         dag                 start git-dag
302         diff                view diffs
303         fetch               fetch remotes
304         find                find files
305         grep                grep source
306         merge               merge branches
307         pull                pull remote branches
308         push                push remote branches
309         rebase              interactive rebase
310         remote              edit remotes
311         search              search commits
312         stash               stash and unstash changes
313         tag                 create tags
314         version             print the version
316 ## HACKING
318 The following commands should be run during development:
320     # Run the unit tests
321     $ make test
323     # Run tests and longer-running pylint and flake8 checks
324     $ make check
326     # Run tests against multiple python interpreters using tox
327     $ make tox
329 The test suite can be found in the [test](test) directory.
331 The tests are setup to run automatically when code is pushed using
332 [Travis CI](https://travis-ci.org/git-cola/git-cola).
333 Checkout the [Travis config file](.travis.yml) for more details.
335 Auto-format `po/*.po` files before committing when updating translations:
337     $ make po
339 When submitting patches, consult the
340 [contributing guidelines](CONTRIBUTING.md).
342 # WINDOWS (continued)
344 ## Development
346 In order to develop *git cola* on Windows you will need to install
347 Python3 and pip.  Install PyQt5 using `pip install PyQt5`
348 to make the PyQt5 bindings available to Python.
350 Once these are installed you can use `python.exe` to run
351 directly from the source tree.  For example, from a Git Bash terminal:
353     /c/Python36/python.exe ./bin/git-cola
355 ## Multiple Python versions
357 If you have multiple versions of Python installed, the `contrib/win32/cola`
358 launcher script might choose the newer version instead of the python
359 that has PyQt installed.  In order to resolve this, you can set the
360 `cola.pythonlocation` git configuration variable to tell cola where to
361 find python.  For example:
363     git config --global cola.pythonlocation /c/Python36
365 ## BUILDING WINDOWS INSTALLERS
367 Windows installers are built using
369 * [Pynsist](https://pynsist.readthedocs.io/en/latest/).
371 * [NSIS](http://nsis.sourceforge.net/Main_Page) is also needed.
373 To build the installer using *Pynsist* run:
375    ./contrib/win32/run-pynsist.sh
377 This will generate an installer in `build/nsis/`.
379 ## WINDOWS HISTORY BROWSER CONFIGURATION UPGRADE
381 You may need to configure your history browser if you are upgrading from an
382 older version of *git-cola*.
384 `gitk` was originally the default history browser, but `gitk` cannot be
385 launched as-is on Windows because `gitk` is a shell script.
387 If you are configured to use `gitk`, then change your configuration to
388 go through Git's `sh.exe` on Windows.  Similarly,we must go through
389 `python.exe` if we want to use `git-dag`.
391 If you want to use *gitk* as your history browser open the
392 *Preferences* screen and change the history browser command to:
394     "C:/Program Files/Git/bin/sh.exe" --login -i C:/Git/bin/gitk
396 *git-dag* became the default history browser on Windows in `v2.3`, so new
397 users should not need to configure anything.