Merge topic 'remove-spaces-wc' into setup
[kiteware-gitsetup.git] / tips
blob80c0cd7d66ebfd68cf429d047f904fc81c51119a
1 #!/usr/bin/env bash
2 #=============================================================================
3 # Copyright 2010-2012 Kitware, Inc.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #=============================================================================
18 # This script makes optional suggestions for working with Git.
20 # Project configuration instructions: NONE
22 egrep_q() {
23 grep -E "$@" >/dev/null 2>/dev/null
26 # Suggest color configuration.
27 if test -z "$(git config --get color.ui)"; then
28 echo '
29 One may enable color output from Git commands with
31 git config --global color.ui auto
35 # Suggest bash completion.
36 if ! bash -i -c 'echo $PS1' | egrep_q '__git_ps1'; then
37 echo '
38 A dynamic, informative Git shell prompt can be obtained by sourcing
39 the git bash-completion script in your "~/.bashrc". Set the PS1
40 environmental variable as suggested in the comments at the top of the
41 bash-completion script. You may need to install the bash-completion
42 package from your distribution to obtain it.
46 # Suggest merge tool.
47 if test -z "$(git config --get merge.tool)"; then
48 echo '
49 One may configure Git to load a merge tool with
51 git config merge.tool <toolname>
53 See "git help mergetool" for more information.