{"id":2259,"date":"2024-08-11T04:58:21","date_gmt":"2024-08-11T08:58:21","guid":{"rendered":"http:\/\/sites.bu.edu\/marcom-team\/?page_id=2259"},"modified":"2025-10-30T13:54:02","modified_gmt":"2025-10-30T17:54:02","slug":"git-versioning","status":"publish","type":"page","link":"https:\/\/sites.bu.edu\/marcom-team\/departments\/interactive-design\/role-specific-info\/designers-developers\/git-versioning\/","title":{"rendered":"Git, Source &#038; Versioning"},"content":{"rendered":"<h2>Source &amp; Version Control<\/h2>\n<p>Git is what BU uses for a version control system.<\/p>\n<p>The following is a simplified definition of what <a href=\"https:\/\/git-scm.com\/\">git<\/a> is from <a href=\"https:\/\/en.wikipedia.org\/wiki\/Git\">Wikipedia<\/a>:<\/p>\n<blockquote><p>Git is a version-control system for tracking changes in computer files and coordinating work on those files among multiple people. It is primarily used for source-code management in software development, but it can be used to keep track of changes in any set of files.<\/p><\/blockquote>\n<h4>There are a two main ways to work with git:<\/h4>\n<div class=\"bu_collapsible_container \" aria-live=\"polite\" data-customize-animation=\"false\"><h4 class=\"bu_collapsible\" aria-expanded=\"false\"tabindex=\"0\" role=\"button\">Using Tower or SourceTree for Version Control<\/h4><div class=\"bu_collapsible_section\" style=\"display: none;\"><br \/>\nThe most popular GUI git client used in Interactive Design is<span>\u00a0<\/span><a href=\"https:\/\/www.git-tower.com\/\">Tower<\/a>, with <a href=\"https:\/\/www.sourcetreeapp.com\/\">Sourcetree<\/a> a close second. Both are powerful programs that takes care of all the git commands under hood. For many visual-learners, this is much quicker than typing commands in the command line and executing them.<\/p>\n<p><strong>To begin using Tower<\/strong>, browse their<span>\u00a0<\/span><a href=\"https:\/\/www.git-tower.com\/help\/mac\/first-steps\/get-started-with-tower\">Getting Started with Tower<\/a><span>\u00a0<\/span>guide. They also have plenty of quick, useful YouTube videos.<\/p>\n<p><strong>To begin using SourceTree<\/strong>, browse their<span>\u00a0<\/span><a href=\"https:\/\/confluence.atlassian.com\/get-started-with-sourcetree\">Get Started with Sourcetree<\/a><span>\u00a0<\/span>guide.<\/p>\n<h4 id=\"7\">Extra Reading: Avoiding Merge Commits<\/h4>\n<p>Pulling changes from a remote branch using <code>git pull<\/code> (or a Pull feature in Tower\/SourceTree) is a <code>git fetch<\/code> followed by a <code>git merge<\/code>, creating a <code>merge commit<\/code>. For instance, pulling master changes into a behind feature branch results in a commit like Merge branch <code>master<\/code> into <code>feature\/some-cool-feature<\/code>.<\/p>\n<p><strong>For GUI users<\/strong>, this can often be accomplished in a dialog box that appears when clicking the Pull button. For example, in Tower when clicking \u201cPull\u201d, a dialog appears that confirms the branch to pull in, along with the option to check \u201cUse Rebase Instead of Merge\u201d. Checking this box will avoid the merge commit. Leaving the box unchecked will result in a merge commit.<\/p>\n<p>Understand how to avoid merge commits by reading these:<span>\u00a0<\/span><a href=\"https:\/\/randyfay.com\/content\/simpler-rebasing-avoiding-unintentional-merge-commits\">Simpler Rebasing (avoiding unintentional merge commits)<\/a><span>\u00a0<\/span>and<span>\u00a0<\/span><a href=\"http:\/\/kernowsoul.com\/blog\/2012\/06\/20\/4-ways-to-avoid-merge-commits-in-git\/\">4 Ways to Avoid Merge Commits in Git<\/a>. <\/div>\n<\/div>\n\n<p>&nbsp;<\/p>\n<div class=\"bu_collapsible_container \" aria-live=\"polite\" data-customize-animation=\"false\"><h4 class=\"bu_collapsible\" aria-expanded=\"false\"tabindex=\"0\" role=\"button\">Using CLI for Version Control<\/h4><div class=\"bu_collapsible_section\" style=\"display: none;\"><br \/>\nFor users who would rather execute git commands themselves in a terminal window, browse the<span>\u00a0<\/span><a href=\"https:\/\/git-scm.com\/book\/en\/v2\/Getting-Started-Installing-Git\">Getting Started Installing Git<\/a><span>\u00a0<\/span>article.<\/p>\n<p>If you prefer to install packages via homebrew, this can also be installed on a machine by running the<span>\u00a0<\/span><code class=\"inline\">brew install git<\/code>command.<\/p>\n<p>To confirm the install was successful, run the<span>\u00a0<\/span><code class=\"inline\">git --version<\/code><span>\u00a0<\/span>command which should print the version of git that was installed on the machine.<\/p>\n<h4 id=\"7\">Extra Reading: Avoiding Merge Commits<\/h4>\n<p>Pulling changes from a remote branch using <code>git pull<\/code> (or a Pull feature in Tower\/SourceTree) is a <code>git fetch<\/code> followed by a <code>git merge<\/code>, creating a <code>merge commit<\/code>. For instance, pulling master changes into a behind feature branch results in a commit like Merge branch <code>master<\/code> into <code>feature\/some-cool-feature<\/code>.<\/p>\n<p><strong>For CLI users<\/strong>, these merge commits can be avoided by running the command<span>\u00a0<\/span><code class=\"inline\">git pull --rebase<\/code><span>\u00a0<\/span>which rewinds your current changes, pulls in the remote code, and then replays your changes one-by-one on top of the incoming branch resulting in no merge commit.<\/p>\n<p>Understand how to avoid merge commits by reading these:<span>\u00a0<\/span><a href=\"https:\/\/randyfay.com\/content\/simpler-rebasing-avoiding-unintentional-merge-commits\">Simpler Rebasing (avoiding unintentional merge commits)<\/a><span>\u00a0<\/span>and<span>\u00a0<\/span><a href=\"http:\/\/kernowsoul.com\/blog\/2012\/06\/20\/4-ways-to-avoid-merge-commits-in-git\/\">4 Ways to Avoid Merge Commits in Git<\/a>. <\/div>\n<\/div>\n\n<p>&nbsp;<\/p>\n<h2>Version Numbering<\/h2>\n<ul>\n<li><a href=\"https:\/\/semver.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Semantic Versioning<\/a><\/li>\n<li><a href=\"https:\/\/docs.google.com\/presentation\/d\/1ycpmhVf-i0fShoHlZ7IeviziQT5IXwSgHB2s45DZKG8\/edit?slide=id.g1a4ccf0ab1_3_641#slide=id.g1a4ccf0ab1_3_641\"><span style=\"font-weight: 400;\">GitHub Repository <\/span><span style=\"font-weight: 400;\">Versioning for Themes <\/span><span style=\"font-weight: 400;\">and Plugins<\/span><\/a><\/li>\n<li><a href=\"https:\/\/github.com\/bu-ist\/responsive-child-starter\/wiki\/Versioning-and-Releases\" target=\"_blank\" rel=\"noopener noreferrer\">Versioning and Releases for Responsive Child Starter 2x<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Source &amp; Version Control Git is what BU uses for a version control system. The following is a simplified definition of what git is from Wikipedia: Git is a version-control system for tracking changes in computer files and coordinating work on those files among multiple people. It is primarily used for source-code management in software [&hellip;]<\/p>\n","protected":false},"author":12906,"featured_media":0,"parent":315,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/pages\/2259"}],"collection":[{"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/users\/12906"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/comments?post=2259"}],"version-history":[{"count":11,"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/pages\/2259\/revisions"}],"predecessor-version":[{"id":4089,"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/pages\/2259\/revisions\/4089"}],"up":[{"embeddable":true,"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/pages\/315"}],"wp:attachment":[{"href":"https:\/\/sites.bu.edu\/marcom-team\/wp-json\/wp\/v2\/media?parent=2259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}