Ask DN: Let's talk about Git

over 8 years ago from Daniel Fosco, UX Designer

  • Caleb SylvestCaleb Sylvest, over 8 years ago

    I would say Git is always worth using. Big project or small, using Git can save tons of headache if something goes wrong or you need to revert code. For one, it's a simple way to backup your work instead of only storing code on your local machine or dropping onto a company server. There are different levels of 'professionalism' when committing code; for example, at work I always commit in well messaged small chunks, but when I'm home and working on small stuff just for myself I may just commit large chunks of code with barely any messages (cause it doesn't affect anyone else).

    For noobs, starting with the Github GUI is a simple way to start learning. But the command line is a super valuable tool to learn, and it's really not that difficult. I'm primarily a designer and do some front-end work, and using the CLI is no problem unless I run into some major issue. Like any skill it takes time to develop an understanding of Git and the tools, so start small and build up to the CLI.

    Another good in-between GUI is SourceTree. Typically I suggest starting with the Github GUI, then move to SourceTree, the straight CLI. While using some CLI from the beginning, like learning how to change directories and clone a repo.

    Hope that helps develop your workshop. If you have any other questions feel free to shoot!

    17 points
    • Daniel FoscoDaniel Fosco, over 8 years ago

      Thanks for the input!

      I think we're pretty much on the same page — I started using Sourcetree and have recently moved to the CLI. Also, agree on Github Client > Sourcetree > CLI.

      One of the roadblocks I see to start using Git is the mental model you have to wrap your head around, which makes total sense and becomes second-nature after a while, but can be hard to grasp in the beginning.

      Btw, do you tie your to-do lists to Github issues using commits? I haven't seen that much, and I'm not sure that's a common occurrence outside of large open-source projects that pretty much live on Github.

      1 point
      • Caleb SylvestCaleb Sylvest, over 8 years ago (edited over 8 years ago )

        The mental model of Git is tough to grasp for beginners. I remember my first day on a new job and I had never used Git. A guy printed out a paper for me to read and look at a flow chart, needless to say it made zero sense.

        Luckily there are now tons of resources for learning Git. Treehouse, CodeSchool, even Github has info for beginners.

        I do use Github issues and tie commits to the issues. We use this method at work quite often. You can do cool stuff like close issues with a commit, if you add something like "Fix #21" to you commit message, but we don't typically do this anymore because we want to QA the issue before closing. So instead (if I remember) I usually copy the commit number in Github and paste it into the issue, which creates a connection.

        1 point