Recently we published a couple of tutorials to get you familiar with Git basics and using Git in a team environment. The commands that we discussed were about enough to help a developer survive in the Git world. In this post, we will try to explore how to manage your time effectively and make full use of the features that Git provides.
1. Git Auto Completion
If you run Git commands through the command line, it’s a tiresome task to type in the commands manually every single time. To help with this, you can enable auto completion of Git commands within a few minutes.
To get the script, run the following in a Unix system:
[code language="python"]
cd ~
curl https://raw.github.com/git/git/master/contrib/completion/git-completion.... -o ~/.git-completion.bash
[/code]
Next, add the following lines to your ~/.bash_profile
file:
[code language="python"]
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
[/code]
Although I have mentioned this earlier, I can not stress it enough: If you want to use the features of Git fully, you should definitely shift to the command line interface!
2. Ignoring Files in Git
Are you tired of compiled files (like .pyc
) appearing in your Git repository? Or are you so fed up that you have added them to Git? Look no further, there is a way through which you can tell Git to ignore certain files and directories altogether. Simply create a file with the name .gitignore
and list the files and directories that you don’t want Git to track. You can make exceptions using the exclamation mark(!).Continue reading %10 Tips to Push Your Git Skills to the Next Level%