Easier use of Git
I’m using Git as the version control system for my projects for some time now. Since the graphical user interfaces are not very mature yet and I like having full control over everything, I’m using Git on the command line (i.e. Bash). In order to avoid entering the same commands all over again, I wrote some Bash aliases and functions, which help me speed up my workflow.
The simplified commands can be downloaded from my Github repository. Instructions for installing and usage can be found in the README.
This is a short summary of the most used commands:
add
Verbose add (executes
git add -v
and thengit status
). All parameters will be forwarded togit add
.Example:
add -p foobar.txt
commit
Alias for
git commit
gadd
Pipes the output of
git ls-files
togrep
to add only those files that match a given pattern. All parameters (including the pattern) will be forwarded togrep
. Likeadd
, this command is verbose and callsgit status
at the end.Example:
gadd -i '\.java$'
log
Alias for
git log
pull
Executes
git pull --rebase
and then displays all commits since the last pull in a short format.push
Alias for
git push
st
Alias for
git status
A complete list can be found in the README.
In the future, I may add further commands. I appreciate any feedback.
Finally, I want to thank Simon Templer and Simon Thum for their ideas!
Posted by Michel Krämer
on 4 June 2010
Next post
Scala projects with Eclipse PDE Build (2)
Since my last article about building Scala projects with Eclipse PDE, the OSGi bundle names of the Scala library and the compiler have changed. This article gives an update and explains how you need to modify your configuration.
Previous post
Multilingual websites with Lift and OSGi
The Scala web framework Lift is able to load strings from property bundles, which allows you to publish a website in different languages. With OSGi, you need a resource bundle factory to load the property bundles with the correct classloader.
Related posts
Build Scala projects with Eclipse Buckminster
Buckminster is a tool to build Eclipse RCP applications. It contains a lightweight Eclipse SDK and features but no means to build Scala projects yet. This post tries to bridge this gap.
10 recipes for gradle-download-task
gradle-download-task is a Gradle plugin that allows you to download files during the build process. This post summarizes common patterns and use cases of gradle-download-task and provides useful tips and tricks.
Steep 5.3.0 has been released
A new minor version has been released. It deprecates a few properties in the workflow and process chain models and offers a few other features such as separate SSH usernames per setup and a new workflow validator.