Warning: Creating default object from empty value in /home/jfcouture/jfcouture.com/wp-content/themes/platform/core/library/class.layout.php on line 159

Warning: Creating default object from empty value in /home/jfcouture/jfcouture.com/wp-content/themes/platform/core/library/class.layout.php on line 162

Warning: Creating default object from empty value in /home/jfcouture/jfcouture.com/wp-content/themes/platform/core/library/class.layout.php on line 165

Warning: Creating default object from empty value in /home/jfcouture/jfcouture.com/wp-content/themes/platform/core/library/class.layout.php on line 168

Warning: Creating default object from empty value in /home/jfcouture/jfcouture.com/wp-content/themes/platform/core/library/class.layout.php on line 171

Warning: Creating default object from empty value in /home/jfcouture/jfcouture.com/wp-content/themes/platform/core/library/class.layout.php on line 173

Warning: Creating default object from empty value in /home/jfcouture/jfcouture.com/wp-content/themes/platform/core/library/class.layout.php on line 175

Warning: Creating default object from empty value in /home/jfcouture/jfcouture.com/wp-content/themes/platform/core/library/class.layout.php on line 197

Warning: Creating default object from empty value in /home/jfcouture/jfcouture.com/wp-content/themes/platform/core/library/class.layout.php on line 201

Warning: Creating default object from empty value in /home/jfcouture/jfcouture.com/wp-content/themes/platform/core/library/class.layout.php on line 224

Warning: Creating default object from empty value in /home/jfcouture/jfcouture.com/wp-content/themes/platform/core/library/class.layout.php on line 225

Warning: Creating default object from empty value in /home/jfcouture/jfcouture.com/wp-content/themes/platform/core/library/class.layout.php on line 226

Warning: Creating default object from empty value in /home/jfcouture/jfcouture.com/wp-content/themes/platform/core/library/class.layout.php on line 316

Warning: Creating default object from empty value in /home/jfcouture/jfcouture.com/wp-content/themes/platform/core/library/class.layout.php on line 316

Warning: Creating default object from empty value in /home/jfcouture/jfcouture.com/wp-content/themes/platform/core/library/class.layout.php on line 316

Warning: Creating default object from empty value in /home/jfcouture/jfcouture.com/wp-content/themes/platform/core/library/class.layout.php on line 316
Various Tips For Setting Up Git: Improve Gitk Look And Get Bash Completion

You just installed git. Now it’s time to set it up. First, you want to set up your name and email, which will be added to your commits:

$ git config --global user.name "Your Name"
$ git config --global user.email name@email.com

Another useful option is alias. We can also use the command line to set it or we can edit ~/.gitconfig:

[alias]
	st = status

This means we can just type git st instead of git status. As you get more familiar with git, you’ll want to add your own aliases.

Check the manual for the complete list of options.

Change gitk fonts

Gitk looks bad. Really bad. We can improve it by changing the default font. You need to edit ~/.gitk:

set mainfont {Monaco 10}
set textfont {Monaco 10}
set uifont {Monaco 10}

Much better.

Bash completion

Lookup contrib/completion in the git source directory. Git-completion.bash includes the instruction to set it up. You need to copy that file somewhere and source it in your ~/.profile. Once this is done, you can press tab to complete git commands, options and the name of branches in bash. The script also adds __git_ps1 which you can use in your PS1 to include the name of the current branch in your bash prompt. Because you will use branches with git, it can help you remember that you switched branch just before leaving work the day before.

Popularity: 50% [?]

 

29 Responses to Various Tips For Setting Up Git: Improve Gitk Look And Get Bash Completion

  1. Alok says:

    The fonts *are* really nice. Thanks for the tip.

  2. [...] of freebies, so please encourage them; they make awesome videos. (really!) You also want to read this article on J-F’s blog. It’ll show you how to put the branch name in your shell prompt. (that alone was worth coming [...]

  3. Great presentation, Jean-François. It’s almost 2 AM, and I’m still playing with Git. There’s an alternative to gitk: qgit, which I talk about on my blog: “An alternative to gitk: qgit”:http://blog.teksol.info/2008/1/16/an-alternative-to-gitk-qgit

  4. Carl Mercier says:

    I like how you assume everybody’s on OS X (Monaco font). Just the way it should be! lol!

  5. [...] [2] See how to configure your console in the same manner and also get auto-completion for Git here. [...]

  6. Lyndon says:

    You share interesting things here. I think that your blog
    can go viral easily, but you must give it initial boost and i know how to do it,
    just type in google for – mundillo traffic increase go viral

  7. tiesha5295 says:

    This really shows that you can still find individuals that value the things they submit on the web. I truly enjoyed reading the comments.

  8. Blood Drug Test says:

    Be properly prepared to pass your drug test

  9. aiko3687 says:

    I believe I actually read another post like this one in the past. It had the exact same content and is just as well posted.

  10. amal8365 says:

    I’m actually delighted I found this posting. It’s well written plus the information is excellent. I am hoping to uncover more like this.

  11. contessa1737 says:

    I wish I could write submissions this good. I’ve been working at this for about eight weeks now and I’m getting better but I can’t wait until I’m just as good as you.

  12. clarice3430 says:

    You barely find content like this anymore. I recall when you could find a few topics like this in minutes however now it’s significantly harder.

  13. sharri7263 says:

    Judging by the number of opinions, this really is undeniably a truly involved subject. Everytime I come back to this post there’s an interesting guest post better than many of the previous ones.

  14. inell3987 says:

    I’ve got to say that this is the most exceptional postings I’ve found on this subject matter. I am going to definately follow your posts.

  15. cheryle8206 says:

    I must admit this is most definitely one of the most eye-catching posts I’ve found for this topic. I could certainly follow your posts.

  16. vince5922 says:

    If I can run into some more posts like here, that would be marvelous.

  17. renna5022 says:

    My spouse and I nearly didn’t check this webpage out but I’m glad I did. That it is very good in comparison to many others I’ve found. I will certainly return.

  18. hedy1286 says:

    I actually almost didn’t check this site out however I’m just happy I have. That it is pretty good in comparison to numerous others I’ve found. I will certainly return.

  19. laronda9763 says:

    This wasn’t the web page I was looking for however now I’m thankful I discovered it. I realize it’s very popular on the web. Good job.

  20. dwana6297 says:

    The following is excellent subject material. One of the best posts I’ve found at present. Carry on the great work.

  21. clora4247 says:

    You can barely come across posts such as this anymore. I remember when you could find a few topics similar to this in less than 10 minutes but now it’s significantly harder.

  22. maddie8172 says:

    Wonderful content in comparison to most of the other topics I’ve discovered. Keep up the good work.

  23. lala2226 says:

    Great content compared to most of the other subject material I’ve read. Keep up the nice work.

  24. 1 hour detox says:

    This unique page is quite engaging. I am going to definately be returning your site.

  25. lanie7308 says:

    This is simply the best information I’ve stumbled on today. It’s not necessarily what I was looking for nonetheless it sure got my interest. I’m glad I took the time to give it a look.

  26. best detox says:

    This post is quite involving. I will certainly be coming back to your website.

  27. Genuinely no matter if someone doesn’t be aware of
    then its up to other viewers that they will help, so here
    it takes place.

  28. It’s not my first time to pay a quick visit this web page, i am browsing this web page dailly and obtain good
    data from here all the time.

  29. Tressa1992 says:

    This post is on 13 spot in google’s search results, if you want more
    traffic, you should build more backlinks to your articles, there is one trick to get free, hidden backlinks
    from authority forums, search on youtube; how to get hidden backlinks
    from forums

Leave a Reply to Blood Drug Test Cancel reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>