Commit 3eb087b5 authored by Chris Bills's avatar Chris Bills

Reorganize information

parent 375e479a
#### **NOTE** - Replace xgitlab.cels.anl.gov with gitlab.cels.anl.gov in the examples if you are working with gitlab.cels.anl.gov.
### bash-functions
A file that contains some example functions that can be helpful when working with git.
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
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
* `!` - Local and remote branches have diverged
* `+` - There is at least 1 local `stash`
* `?` - There are files in the git working directory that are untracked
Example:
## Contents of this Repository
![example prompt and gits output](media/example.png)
* README.md - This README / Quick Start Guide
* bash-functions - File that contains some example functions
* bash-git_prompt - An example colorful prompt for bash to show git status
* git-aliases - Some example aliases for `~/.gitconfig`
### git-aliases
A collection of useful git aliases. These can be placed in `~/.gitconfig` (recommended) or within a project's git config (not recommended).
* `co` - Alias for `checkout`, easier and quicker to type
* `last` - Display information about the most recent commit
* `unstage` - Reverse a `git add <file>` with `git unstage <file>`
* `ls` - list all the files currently tracked by git
* `vis` - display a pretty listing of log messages with a graph of the branching
* `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
Examples and more information about bash-functions, bash-git_prompt and git-aliases below the Getting Started guide.
### Getting Started with GitLab
......@@ -171,3 +146,39 @@ git remote add xgitlab xgitlab:<namespace>/<project>.git
git push xgitlab --all # Push all local branches to the new remote
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.
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
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
* `!` - Local and remote branches have diverged
* `+` - There is at least 1 local `stash`
* `?` - There are files in the git working directory that are untracked
Example:
![example prompt and gits output](media/example.png)
### git-aliases
A collection of useful git aliases. These can be placed in `~/.gitconfig` (recommended) or within a project's git config (not recommended).
* `co` - Alias for `checkout`, easier and quicker to type
* `last` - Display information about the most recent commit
* `unstage` - Reverse a `git add <file>` with `git unstage <file>`
* `ls` - list all the files currently tracked by git
* `vis` - display a pretty listing of log messages with a graph of the branching
* `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
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