Commit f46d65c9 authored by Chris Bills's avatar Chris Bills

Updated descriptions of the files

parent d4ac1486
......@@ -163,8 +163,12 @@ git push xgitlab --tags # Push any local tags to GitLab (optional)
### bash-functions
A file that contains some example functions that can be helpful when working with git.
#### About
The `bash-functions` file contains some example functions that can be helpful when working with git. If you have suggestions, additions or fixes, you are encouraged to submit merge requests.
1. `gits [#]` - a function that displays a brief summary of changes and the previous 5 log messages and hash commits. If an optional number is provided, it will display that many log messages.
#### Usage
Copy the contents of `bash-functions` into `~/.bashrc` or copy the file somewhere in your home directory and add something like the following to `~/.bashrc`:
```
......@@ -173,11 +177,13 @@ if [[ -e "$HOME/.bash_functions" ]]; then
fi
```
1. `gits [#]` - a function that displays a brief summary of changes and the previous 5 log messages and hash commits. If an optional number is provided, it will display that many log messages.
### bash-git_prompt
Copy the contents of `bash-git_prompt` into `~/.bashrc` or copy the file somewhere in your home directory and add something like the following to `~/.bashrc`:
#### About
The bash-git_prompt file contains some functions and configuration for adding git status information to your current prompt. It is meant as an example, you are encouraged to tweak it to meet your needs and suggest additions, fixes or updates.
#### Usage
You can copy it wholesale into your `~/.bashrc` configuration file, or you can add something like the following to `~/.bashrc` to source a file:
```
if [[ -e "$HOME/.bash_git_prompt" ]]; then
......@@ -187,8 +193,6 @@ fi
**Note:** If you are using `$PROMPT_COMMAND` in your `~/.bashrc` already, you will need to take some care and adjust the contents of `bash-git_prompt`
An example addition to the bash prompt that will show you which branch you currently have checked out, and what its status is.
#### Symbol meanings:
* `>` - Local branch is ahead of the branch it is tracking
* `<` - Local branch is behind the branch it is tracking
......@@ -202,7 +206,10 @@ Example:
### git-aliases
A collection of useful git aliases. These can be placed in `~/.gitconfig` (recommended) or within a project's git config (not recommended).
#### About
The file `git-aliases` contains a handful useful git aliases. These can be placed in `~/.gitconfig` (recommended) or within a project's git config (not recommended).
As with everything else, if you have additions, fixes or updates, you are encouraged to share them.
* `co` - Alias for `checkout`, easier and quicker to type
* `last` - Display information about the most recent commit
......@@ -212,5 +219,7 @@ A collection of useful git aliases. These can be placed in `~/.gitconfig` (recom
* `today` - (Requires git v1.8+) displays log of commits since yesterday; e.g. today's commits
* `squash` - Does an interactive rebase of the previous # commits; useful for squashing commits
* `stashed` - Display information about stashes
* `history` - Show the history of a file, branch or other ref including commit messages and diff / patch
#### Usage
Copy the aliases from `git-aliases` that you want to use into `~/.gitconfig`
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment