{"id":3952,"date":"2016-10-24T13:36:56","date_gmt":"2016-10-24T12:36:56","guid":{"rendered":"https:\/\/marvel7077.wpengine.com\/?p=3952"},"modified":"2020-12-13T22:52:44","modified_gmt":"2020-12-13T22:52:44","slug":"designers-guide-git","status":"publish","type":"post","link":"https:\/\/marvelapp.com\/blog\/designers-guide-git\/","title":{"rendered":"The Designers Guide to Git"},"content":{"rendered":"<blockquote class=\"pageWrap pageWrap--s position-relative marginTopBottom-l breakPointM-marginTopBottom-xl\"><div class=\"blog-quote-before position-absolute bg-marvel\"><\/div><div class=\"tweet-quote blog-quote-after position-absolute bg-marvel cursor-pointer transitionDuration-l transitionProperty-all transitionTimingFunction-cv-easeOutCircular scaleUp--hover zi-weak\"><svg class=\"fill-white opacity-0 pointerEvents-none position-absolute pinCenter transitionProperty-all transitionTimingFunction-easeInOut\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"20\" viewBox=\"0 0 24 20\"><path d=\"M24,2.37a9.64,9.64,0,0,1-2.83.79A5,5,0,0,0,23.34.37a9.72,9.72,0,0,1-3.13,1.23A4.86,4.86,0,0,0,16.62,0a5,5,0,0,0-4.8,6.2A13.87,13.87,0,0,1,1.67.92,5.13,5.13,0,0,0,3.19,7.67,4.81,4.81,0,0,1,1,7a5,5,0,0,0,3.95,5,4.82,4.82,0,0,1-2.22.09,4.94,4.94,0,0,0,4.6,3.51A9.72,9.72,0,0,1,0,17.73,13.69,13.69,0,0,0,7.55,20c9.14,0,14.31-7.92,14-15A10.17,10.17,0,0,0,24,2.37Z\"\/><\/svg><\/div><p class=\"blog-quote position-relative textAlign-center c-marvel\"><span class=\"blog-quote-text transitionDuration-l transitionProperty-all transitionTimingFunction-easeInOut\">\"Writing code with Git is hard. Writing code without it is <em>unthinkable<\/em>.\"<\/p><\/span><\/blockquote>\n<h2 class=\"pageWrap pageWrap--s marginTop-xl marginBottom-l c-black lineHeight-xl fontSize-xl fontWeight-5 breakPointM-lineHeight-xxl breakPointM-fontSize-xxl\" style=\"margin-left: auto; margin-right: auto;\">Or anyone who really wants to use it but has no idea how<\/h2>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Writing code is hard. For every 1 minute of bliss typing characters in the computer and seeing it render things that didn\u2019t exist before, there are 10 minutes of frustration with unreadable code and bugs that didn\u2019t exist the night before.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Whether you\u2019re senior developer on a huge team or a designer who just started dabbling with front-end for personal projects, using Git will change the way you code for the best and make group collaboration enjoyable.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">This guide will walk you through basic concepts in Git with some hands-on action at the end. It won\u2019t make you a Git master, but you will be able to use Git by yourself with <a class=\"link link--blue fontWeight-4\"href=\"https:\/\/github.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Github<\/a> and it\u2019s <a class=\"link link--blue fontWeight-4\"href=\"https:\/\/desktop.github.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">desktop app<\/a>.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\"><strong class=\"c-slate lineHeight-l fontSize-l fontWeight-5 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">PSA:<\/strong> This is a guide for <em>absolute beginners<\/em>\u2026 if you already have Git chops feel free to skim through or jump to the references in the end of the article.<\/p>\n<h2 class=\"pageWrap pageWrap--s marginTop-xl marginBottom-l c-black lineHeight-xl fontSize-xl fontWeight-5 breakPointM-lineHeight-xxl breakPointM-fontSize-xxl\" style=\"margin-left: auto; margin-right: auto;\">What is Git?<\/h2>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\"><strong class=\"c-slate lineHeight-l fontSize-l fontWeight-5 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Git is a distributed version-control system for code.<\/strong><\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Descriptive but not very helpful, right? Let me tell you a true story then:<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\"><span class=\"long-quote\"><em>You\u2019re working on a small website. You\u2019ve been trying to get that sticky footer right for a whole hour and somehow only managed to make it worse in the process. It\u2019s 2AM. You hate CSS and are currently in the process of re-thinking your life choices. Screw this, <strong class=\"c-slate lineHeight-l fontSize-l fontWeight-5 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">let\u2019s go back to the previous version from 3 hours ago<\/strong> and watch some Netflix.<\/em><\/span><\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Oh wait.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">The <em>previous version<\/em>. You don\u2019t have it anymore, do you?<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">What if every change in your project was tracked\u200a\u2014\u200aevery character and line of code you added or deleted. What if you could save <em>all<\/em> of your code at <em>every<\/em> stage of your work?<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">That way, once you started working on the <em>feature\/sticky-footer<\/em>, you were sure nothing would be lost if you decided to roll back\u200a\u2014\u200aand you could even go back to work on this feature later if you wanted to.<\/p>\n<div id='gallery-1' class='gallery galleryid-3952 gallery-columns-1 gallery-size-full'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/bliss.png'><img loading=\"lazy\" decoding=\"async\" width=\"1527\" height=\"519\" src=\"https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/bliss.png\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/bliss.png 1527w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/bliss-600x204.png 600w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/bliss-768x261.png 768w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/bliss-1500x510.png 1500w\" sizes=\"auto, (max-width: 1527px) 100vw, 1527px\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/>\n\t\t<\/div>\n\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">That\u2019s what Git does. It tracks and saves <strong class=\"c-slate lineHeight-l fontSize-l fontWeight-5 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">snapshots of your entire codebase<\/strong> and allows you to easily distribute it to other developers (either teammates or people on the internet). In practice, Git will allow you to:<\/p>\n<ul class=\"pageWrap pageWrap--s list list--unordered marginBottom-l lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">\n<li>Roll-back changes in your code<\/li>\n<li>Develop new features without affecting code that\u2019s already live<\/li>\n<li>Collaborate with other developers in the <em>same code at the same time<\/em> without going insane<\/li>\n<li>Make it <em>really hard<\/em> to screw things up<\/li>\n<\/ul>\n<h3 class=\"pageWrap pageWrap--s marginTop-l marginBottom-m c-black lineHeight-xl fontSize-xl fontWeight-5\">But what about\u2026 Github?<\/h3>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">This can be confusing for beginners, so let\u2019s clear it up.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Git is an open-source system. You use it by running it on your machine to save your code and then upload it to a server where other people can see it. The thing is, for this to work you have to install Git on this server and manage it yourself. Which, as you probably guessed, <em>is a major pain in the ass<\/em>.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\"><a class=\"link link--blue fontWeight-4\"href=\"https:\/\/github.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Github<\/a> was created to address this problem. It\u2019s a platform that hosts your code on a remote Git server with a nice web interface and allows you to collaborate with other project members on the same server. Conversely, the <a class=\"link link--blue fontWeight-4\"href=\"https:\/\/desktop.github.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Github app<\/a> can be used instead of the default Git command-line application on your desktop.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">There are others similar platforms like <a class=\"link link--blue fontWeight-4\"href=\"https:\/\/about.gitlab.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Gitlab<\/a> and <a class=\"link link--blue fontWeight-4\"href=\"https:\/\/bitbucket.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Bitbucket<\/a>\u200a\u2014\u200athey are great products as well. Github became huge for its interface focused on team collaboration and massive adoption by the open-source community.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">For the sake of convention we\u2019re going to use Github for this guide, but the same could be achieved using other hosted platforms.<\/p>\n<h3 class=\"pageWrap pageWrap--s marginTop-l marginBottom-m c-black lineHeight-xl fontSize-xl fontWeight-5\">How it works<\/h3>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">When you use Git, your project lives in a <strong class=\"c-slate lineHeight-l fontSize-l fontWeight-5 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">repository<\/strong>. Every project is a repository, and every repository has a different history\u200a\u2014\u200abasically, a timeline of every change you saved in it.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">However, Git doesn\u2019t save changes to the history automatically. To save a change to your history, you need to <strong class=\"c-slate lineHeight-l fontSize-l fontWeight-5 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">commit<\/strong> your changes.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">The commit is the most important thing about Git. <em>Committing<\/em> is the way to add a file or save changed files to your repository history.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">A commit represents a snapshot of your repository in the moment that commit was saved\u200a\u2014\u200a<em>all of your repository, with every file, all of it.<\/em><\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">You can type a message for each of your commits, describing which changes it\u2019s saving to the project\u2019s history. It\u2019s important to keep your commit messages descriptive and short. <strong class=\"c-slate lineHeight-l fontSize-l fontWeight-5 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Never commit without writing a commit message.<\/strong><\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Committing is a powerful tool. It allows you to think about your code in chunks and organizes your work\u200a\u2014\u200aeach small part of your work is done and checked in a commit before moving to the next.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">There are other important things to know, but let\u2019s do this <strong class=\"c-slate lineHeight-l fontSize-l fontWeight-5 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">right now.<\/strong><\/p>\n<h3 class=\"pageWrap pageWrap--s marginTop-l marginBottom-m c-black lineHeight-xl fontSize-xl fontWeight-5\">Getting our hands dirty<\/h3>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Let\u2019s create a repository and do a test commit. Start by creating a Github account (<a class=\"link link--blue fontWeight-4\"href=\"http:\/\/github.com\/join\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/github.com\/join<\/a>) if you don\u2019t have one already.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Once you do, create a new repository. You can name it however you want, this is just a test. Leave other configurations untouched for now.<\/p>\n<div id=\"attachment_4100\" style=\"width: 760px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4100\" class=\"size-full wp-image-4100\" src=\"https:\/\/marvel7077.wpengine.com\/wp-content\/uploads\/2016\/10\/image20.png\" alt=\"Create a new repository\" width=\"750\" height=\"586\" srcset=\"https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image20.png 750w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image20-600x469.png 600w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><p id=\"caption-attachment-4100\" class=\"wp-caption-text\">Pretty straightforward<\/p><\/div>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">You\u2019ve probably seen people using Git with the command-line. It\u2019s easy to do it, but don\u2019t worry, we\u2019ll skip the command-line for now. We will use <a class=\"link link--blue fontWeight-4\"href=\"https:\/\/desktop.github.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Github\u2019s desktop app<\/a> that achieves the same purpose with a helpful UI for Windows or Mac.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Once your repository was created at Github and you have the Desktop app up and running, you'll see it listed in the app. Now you need to copy it to your machine.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">That is, you need to <strong class=\"c-slate lineHeight-l fontSize-l fontWeight-5 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">clone<\/strong> it. The app will give you the option to select a folder where the repository will live in your computer: that's where your code should go.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4101\" src=\"https:\/\/marvel7077.wpengine.com\/wp-content\/uploads\/2016\/10\/image12.png\" alt=\"Quick setup\" width=\"989\" height=\"142\" srcset=\"https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image12.png 989w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image12-600x86.png 600w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image12-768x110.png 768w\" sizes=\"auto, (max-width: 989px) 100vw, 989px\" \/><\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4102\" src=\"https:\/\/marvel7077.wpengine.com\/wp-content\/uploads\/2016\/10\/image18.png\" alt=\"Repository folders\" width=\"800\" height=\"483\" srcset=\"https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image18.png 800w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image18-600x362.png 600w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image18-768x464.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<h3 class=\"pageWrap pageWrap--s marginTop-l marginBottom-m c-black lineHeight-xl fontSize-xl fontWeight-5\">Saving your changes<\/h3>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Once you have your repo (short for repository) cloned, add any file and you\u2019ll see all changes listed in the Github App:<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4103\" src=\"https:\/\/marvel7077.wpengine.com\/wp-content\/uploads\/2016\/10\/image13.png\" alt=\"See all changes\" width=\"800\" height=\"482\" srcset=\"https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image13.png 800w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image13-600x362.png 600w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image13-768x463.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4104\" src=\"https:\/\/marvel7077.wpengine.com\/wp-content\/uploads\/2016\/10\/image10.png\" alt=\"All changes\" width=\"800\" height=\"99\" srcset=\"https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image10.png 800w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image10-600x74.png 600w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image10-768x95.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">See the change? Now let\u2019s <em>commit it:<\/em><\/p>\n<div id=\"attachment_3960\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3960\" class=\"size-full wp-image-3960\" src=\"https:\/\/marvel7077.wpengine.com\/wp-content\/uploads\/2016\/10\/Commit.png\" alt=\"commit\" width=\"800\" height=\"415\" srcset=\"https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/Commit.png 800w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/Commit-600x311.png 600w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/Commit-768x398.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><p id=\"caption-attachment-3960\" class=\"wp-caption-text\">Pro-tip: To make your commits consistent, start them with a verb in present tense, as if you were saying before the message \u201cIf you use this commit it wil\u2026\u201d<\/p><\/div>\n<div id=\"attachment_3961\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3961\" class=\"size-full wp-image-3961\" src=\"https:\/\/marvel7077.wpengine.com\/wp-content\/uploads\/2016\/10\/Commit-history.png\" alt=\"commit-history\" width=\"1200\" height=\"782\" srcset=\"https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/Commit-history.png 1200w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/Commit-history-600x391.png 600w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/Commit-history-768x500.png 768w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><p id=\"caption-attachment-3961\" class=\"wp-caption-text\">Your commit history!<\/p><\/div>\n<h3 class=\"pageWrap pageWrap--s marginTop-l marginBottom-m c-black lineHeight-xl fontSize-xl fontWeight-5\">One important caveat<\/h3>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">It's important to notice that <em>your file changes will only be tracked after the file is committed for the first time<\/em>. Here's a visual explanation:<\/p>\n<div id=\"attachment_4107\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4107\" class=\"size-full wp-image-4107\" src=\"https:\/\/marvel7077.wpengine.com\/wp-content\/uploads\/2016\/10\/image17.png\" alt=\"New file commit\" width=\"800\" height=\"98\" srcset=\"https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image17.png 800w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image17-600x74.png 600w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image17-768x94.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><p id=\"caption-attachment-4107\" class=\"wp-caption-text\">When a new file is added, Git still doesn't know about it. If you don't commit it\u2026<\/p><\/div>\n<div id=\"attachment_4108\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4108\" class=\"size-full wp-image-4108\" src=\"https:\/\/marvel7077.wpengine.com\/wp-content\/uploads\/2016\/10\/image19.png\" alt=\"Changes to new files\" width=\"800\" height=\"98\" srcset=\"https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image19.png 800w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image19-600x74.png 600w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/image19-768x94.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><p id=\"caption-attachment-4108\" class=\"wp-caption-text\">\u2026any change you make will be lost! The previous line is gone and Git has no history saved.<\/p><\/div>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">That's one of the reasons it's important to <em>constantly commit you work<\/em>, in small chunks\u200a\u2014\u200aspecially when you're adding a new file. This way you make sure you can roll-back small changes if necessary and no work is lost.<\/p>\n<h3 class=\"pageWrap pageWrap--s marginTop-l marginBottom-m c-black lineHeight-xl fontSize-xl fontWeight-5\">Sharing your code<\/h3>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Once you\u2019re done working, make sure you push your changes to Github using the <strong class=\"c-slate lineHeight-l fontSize-l fontWeight-5 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Publish<\/strong> button on the top, so other collaborators can see them (and you have a backup in case something <em>bad<\/em> happens to your computer)! Conversely, to get the changes added by other collaborators from Github, just press <strong class=\"c-slate lineHeight-l fontSize-l fontWeight-5 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Sync<\/strong>.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Want to see a previous state of your project? Just <strong class=\"c-slate lineHeight-l fontSize-l fontWeight-5 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">select a previous commit on your history.<\/strong><\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">It\u2019s great to see your repository history growing, being sure that you can roll-back your changes anytime. It can (and probably will) get messy after a while, but knowing <em>it\u2019s really hard<\/em> to screw things up is a reassuring way to work.<\/p>\n<div id=\"attachment_3964\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3964\" class=\"size-full wp-image-3964\" src=\"https:\/\/marvel7077.wpengine.com\/wp-content\/uploads\/2016\/10\/Descriptive-commit-messages.png\" alt=\"descriptive-commit-messages\" width=\"1200\" height=\"783\" srcset=\"https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/Descriptive-commit-messages.png 1200w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/Descriptive-commit-messages-600x392.png 600w, https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/Descriptive-commit-messages-768x501.png 768w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><p id=\"caption-attachment-3964\" class=\"wp-caption-text\">Again: make sure your commit messages are as descriptive as possible<\/p><\/div>\n<h3 class=\"pageWrap pageWrap--s marginTop-l marginBottom-m c-black lineHeight-xl fontSize-xl fontWeight-5\">What's Next<\/h3>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">You may have realized the Github app shows an option called <strong class=\"c-slate lineHeight-l fontSize-l fontWeight-5 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">branches<\/strong>. Branches are a good way to modularize your project and make sure your code changes don\u2019t conflict with other collaborators\u2014 but let\u2019s leave this for another day \u2728.<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Using Git by yourself is already a great way to organize the way you code and make sure you can roll-back any unwanted changes. However, this is <em>really<\/em> just the beginning about Git. If you want further reference, here are some useful links:<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\"><a class=\"link link--blue fontWeight-4\"href=\"https:\/\/www.codeschool.com\/courses\/try-git\" target=\"_blank\" rel=\"noopener noreferrer\">CodeSchool has a crash-course on Git<\/a><\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">Another <a class=\"link link--blue fontWeight-4\"href=\"http:\/\/rogerdudler.github.io\/git-guide\/\" target=\"_blank\" rel=\"noopener noreferrer\">beginner guide for those that want to use Git in the command line<\/a><\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\"><a class=\"link link--blue fontWeight-4\"href=\"https:\/\/www.git-tower.com\/blog\/git-cheat-sheet\/\" target=\"_blank\" rel=\"noopener noreferrer\">A cheatsheet of Git commands <\/a>(you may want to see the previous guides first to make sense of this)<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\"><a class=\"link link--blue fontWeight-4\"href=\"https:\/\/git-scm.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Official Git reference<\/a> (for the brave-hearted!)<\/p>\n<p class=\"pageWrap pageWrap--s marginBottom-m paddingBottom-s c-slate lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\"><em>This post was originally published on <a class=\"link link--blue fontWeight-4\"href=\"https:\/\/medium.com\/@dfosco\/git-for-designers-856c434716e#.hn8oawrd5\" target=\"_blank\" rel=\"noopener noreferrer\">Daniel's Medium Profile<\/a>.<\/em><\/p>\n<h3 class=\"pageWrap pageWrap--s marginTop-l marginBottom-m c-black lineHeight-xl fontSize-xl fontWeight-5\">Further reading:<\/h3>\n<ul class=\"pageWrap pageWrap--s list list--unordered marginBottom-l lineHeight-l fontSize-l fontWeight-3 breakPointM-fontSize-xl breakPointM-lineHeight-xl\">\n<li class=\"LinkSuggestion__LinkSuggestionWrapper-sc-1mdih4x-0 bRwwZe\"><a class=\"link link--blue fontWeight-4\"class=\"LinkSuggestion__Link-sc-1mdih4x-2 dcwLhi\" href=\"https:\/\/marvelapp.com\/blog\/how-to-test-ux-design-early-process\/\" target=\"_blank\" rel=\"noopener noreferrer\">How To Test UX Design Early On In Your Process<\/a><\/li>\n<li class=\"LinkSuggestion__LinkSuggestionWrapper-sc-1mdih4x-0 bRwwZe\"><a class=\"link link--blue fontWeight-4\"class=\"LinkSuggestion__Link-sc-1mdih4x-2 dcwLhi\" href=\"https:\/\/marvelapp.com\/blog\/bidirectional-scrolling-save-responsive-design\/\" target=\"_blank\" rel=\"noopener noreferrer\">Bidirectional Scrolling is Here to Save Responsive Design<\/a><\/li>\n<li class=\"LinkSuggestion__LinkSuggestionWrapper-sc-1mdih4x-0 bRwwZe\"><a class=\"link link--blue fontWeight-4\"class=\"LinkSuggestion__Link-sc-1mdih4x-2 dcwLhi\" href=\"https:\/\/marvelapp.com\/blog\/why-design-systems-fail-how-to-make-them-work\/\" target=\"_blank\" rel=\"noopener noreferrer\">Why Design Systems Fail, and How to Make Them Work<\/a><\/li>\n<li class=\"LinkSuggestion__LinkSuggestionWrapper-sc-1mdih4x-0 bRwwZe\"><a class=\"link link--blue fontWeight-4\"class=\"LinkSuggestion__Link-sc-1mdih4x-2 dcwLhi\" href=\"https:\/\/marvelapp.com\/blog\/dear-developers-the-universe-is-telling-me-to-code\/\" target=\"_blank\" rel=\"noopener noreferrer\">Dear Developers, I feel like the universe is telling me to code<\/a><\/li>\n<li class=\"LinkSuggestion__LinkSuggestionWrapper-sc-1mdih4x-0 bRwwZe\"><a class=\"link link--blue fontWeight-4\"class=\"LinkSuggestion__Link-sc-1mdih4x-2 dcwLhi\" href=\"https:\/\/marvelapp.com\/blog\/z-list-tech-terms-need-know-ux-designer\/\" target=\"_blank\" rel=\"noopener noreferrer\">An A-Z List of Tech Terms You Need to Know as a UX Designer<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;Writing code with Git is hard. Writing code without it is unthinkable.&#8221; Or anyone who really wants to use it but has no idea how Writing code is hard. For every 1 minute of bliss typing characters in the computer and seeing it render things that didn\u2019t exist before, there are 10 minutes of frustration with unreadable code and bugs&#8230; <a class=\"link link--blue fontWeight-4\" href=\"https:\/\/marvelapp.com\/blog\/designers-guide-git\/\">Read More &#65515;<\/a><\/p>\n","protected":false},"author":51,"featured_media":4097,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-3952","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-viewpoint"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v15.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<meta name=\"description\" content=\"The Designers Guide to Git - This guide will walk you through basic concepts in Git with some hands-on action at the end.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/marvelapp.com\/blog\/designers-guide-git\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The Designers Guide to Git | Marvel Blog\" \/>\n<meta property=\"og:description\" content=\"The Designers Guide to Git - This guide will walk you through basic concepts in Git with some hands-on action at the end.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/marvelapp.com\/blog\/designers-guide-git\/\" \/>\n<meta property=\"og:site_name\" content=\"Marvel Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/marvelapp\" \/>\n<meta property=\"article:published_time\" content=\"2016-10-24T12:36:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-13T22:52:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/git-header-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"6730\" \/>\n\t<meta property=\"og:image:height\" content=\"2590\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@marvelapp\" \/>\n<meta name=\"twitter:site\" content=\"@marvelapp\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"6 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/marvelapp.com\/blog\/#organization\",\"name\":\"Marvel\",\"url\":\"https:\/\/marvelapp.com\/blog\/\",\"sameAs\":[\"https:\/\/www.facebook.com\/marvelapp\",\"https:\/\/www.instagram.com\/marvelapp\/\",\"https:\/\/www.linkedin.com\/company\/marvel-app\/\",\"https:\/\/twitter.com\/marvelapp\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/marvelapp.com\/blog\/#logo\",\"inLanguage\":\"en-GB\",\"url\":\"https:\/\/marvelapp.com\/wp-content\/uploads\/2018\/06\/Logo-Light.png\",\"width\":1605,\"height\":1130,\"caption\":\"Marvel\"},\"image\":{\"@id\":\"https:\/\/marvelapp.com\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/marvelapp.com\/blog\/#website\",\"url\":\"https:\/\/marvelapp.com\/blog\/\",\"name\":\"Marvel Blog\",\"description\":\"Ideas and words on user experience, design, collaboration and more\",\"publisher\":{\"@id\":\"https:\/\/marvelapp.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/marvelapp.com\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/marvelapp.com\/blog\/designers-guide-git\/#primaryimage\",\"inLanguage\":\"en-GB\",\"url\":\"https:\/\/marvelapp.com\/wp-content\/uploads\/2016\/10\/git-header-1.png\",\"width\":6730,\"height\":2590,\"caption\":\"Designers Guide to Git\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/marvelapp.com\/blog\/designers-guide-git\/#webpage\",\"url\":\"https:\/\/marvelapp.com\/blog\/designers-guide-git\/\",\"name\":\"The Designers Guide to Git | Marvel Blog\",\"isPartOf\":{\"@id\":\"https:\/\/marvelapp.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/marvelapp.com\/blog\/designers-guide-git\/#primaryimage\"},\"datePublished\":\"2016-10-24T12:36:56+00:00\",\"dateModified\":\"2020-12-13T22:52:44+00:00\",\"description\":\"The Designers Guide to Git - This guide will walk you through basic concepts in Git with some hands-on action at the end.\",\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/marvelapp.com\/blog\/designers-guide-git\/\"]}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/marvelapp.com\/blog\/designers-guide-git\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/marvelapp.com\/blog\/designers-guide-git\/#webpage\"},\"author\":{\"@id\":\"https:\/\/marvelapp.com\/blog\/#\/schema\/person\/1b5c9db8a77c1080e839813299f9a7f8\"},\"headline\":\"The Designers Guide to Git\",\"datePublished\":\"2016-10-24T12:36:56+00:00\",\"dateModified\":\"2020-12-13T22:52:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/marvelapp.com\/blog\/designers-guide-git\/#webpage\"},\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/marvelapp.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/marvelapp.com\/blog\/designers-guide-git\/#primaryimage\"},\"articleSection\":\"Viewpoint\",\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/marvelapp.com\/blog\/designers-guide-git\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/marvelapp.com\/blog\/#\/schema\/person\/1b5c9db8a77c1080e839813299f9a7f8\",\"name\":\"Daniel Fosco\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/marvelapp.com\/blog\/#personlogo\",\"inLanguage\":\"en-GB\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3a7d42e82f14d38077863d2c2313c86871ce8e86a3378f3c2646af770d784f93?s=96&d=mm&r=g\",\"caption\":\"Daniel Fosco\"},\"description\":\"Digital designer at VTEX. I make sites and apps to improve the way people live and work. Also: eating tacos like there's no tomorrow. Follow me on Twitter.\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","_links":{"self":[{"href":"https:\/\/marvelapp.com\/blog\/wp-json\/wp\/v2\/posts\/3952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/marvelapp.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/marvelapp.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/marvelapp.com\/blog\/wp-json\/wp\/v2\/users\/51"}],"replies":[{"embeddable":true,"href":"https:\/\/marvelapp.com\/blog\/wp-json\/wp\/v2\/comments?post=3952"}],"version-history":[{"count":0,"href":"https:\/\/marvelapp.com\/blog\/wp-json\/wp\/v2\/posts\/3952\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/marvelapp.com\/blog\/wp-json\/wp\/v2\/media\/4097"}],"wp:attachment":[{"href":"https:\/\/marvelapp.com\/blog\/wp-json\/wp\/v2\/media?parent=3952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/marvelapp.com\/blog\/wp-json\/wp\/v2\/categories?post=3952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/marvelapp.com\/blog\/wp-json\/wp\/v2\/tags?post=3952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}