If you are using zsh as your terminal in Ubuntu, you can use a built in feature to display version control information at the prompt.
After reading “Zsh Prompt Magic” I created the zsh_vcs_info file which you can download. You place it in your home directory and open .zshrc and add the following line:
source /home/user/.zsh_vcs_info
Notice that I added a . (dot) in the filename because I want it to be hidden. Also, notice that “user” in the path above, is the username of the account you use to log into Ubuntu.
Lets assume you are in a team, working on a Rails project and you have chosen Git as your version control system. One way to complete a working cycle from pull to push is:
DISCLAIMER: There are more ways and many situations that are not described here. This is only a note to self that may also be useful to you.
Read more…
When I am working with git, I find it useful to take a quick look at the log. The default
$ git log
command doesn’t show the actual modified/added/deleted files. You can use the following command for that:
$ git log --pretty --stat
or
$ git log --pretty=format:"[%h] %ae, %ar: %s" --stat
I found the latter in one of Alex Young’s tweets.
If you have any favorite git log formats, please feel free to mention them in a comment.
Recent Comments