From BC$ MobileTV Wiki
Jump to: navigation, search

git is an SCM methodology and technology using an (arguably) simplified set of commands for version control in comparison to similar methodologies (namely, CVS and SVN), and allowing for distributed repositories such that a developer first "pulls" a full copy of the repository locally with its own versioning. Once they are satisfied with a particular set of code updates or new feature addition, they can "push" all of their code from local (as per traditional SCM), or, simply push the changes which can then be first piped through a "Code Review" step in the SCM pipeline before being merged back to the main repository, which via DIFF can show exactly what changes were made and whether there are any conflicts with the latest version of the repository. If there are conflicts the updated code never gets merged back to the main tree directly, another pull request will get the developer's repository up-to-date first, and then they can try again. This in theory, reduces situations where small incremental updates from widely dispersed teams of developers wipe out the work of other developers in the main "branch".

Distributed Repositories

git versioning stores code in a repository (commonly abbreviated as repo). The repo is by default held on your own system with branches separate from master; however that configuration is of limited use to larger teams. It is much better to run in distributed version control mode to realize the full power of git. Some popular sites & web services have cropped up to support distributed git modes, and will be summarized below.


GitLab is an open source SCM tool that combines a web-based GIT platform with a desktop client (via Gitorious acquisition)[1], and a strong focus on CI/CD.[2][3]

[4] [5] [6] [7] [8] [9] [10]


BitBucket is an SCM tool that provides both GIT and Mercurial repository hosting either in a Cloud or Self-Hosted model. Tthe Self=Hosted option is formerly known as "Stash" before Atlassian acquired BitBucket and merged the two tools under the BitBucket banner[11], taking the BitBucket name)


[13] [14] [15] [16] [17] [18] [19]

BitBucket Cloud

[26] [27]

[36] [37]

BitBucket Pipelines

[44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85]


[89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105]

BitBucket Deployments

[106] [107] [108] [109] [110] [111] [112] [113] [114] [115] [116] [117][118][119] [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131] [132]

  • GIT Large File Storage (LFS): (open source Git extension for versioning large files... partnership between rivals GitHub & BitBucket created this OSS extension to GIT)

[133] [134] [135] [136] [137] [138] [139] [140] [141]

[142] [143] [144] [145] [146] [147] [148] [149] [150] [151] [152] [153] [154]


GitHub was "the" original web-based GIT platform. Aside from being a robust platform with good uptime, it also offers "subscription0-based" plans for Private repositories and [GitHub Pages] (a free project-info/landing-page hosting service), as well as a number of other useful features (including integrations to the most popular development tools).

[155] [156] [157] [158] [159] [160] [161] [162] [163] [164] [165] [166] [167] [168] [169] [170] [171]

Branching Models



Similar to SVN.

Feature Branching

Branch-per-issue or Feature (i.e. "User Story" in Agile), branching off of "master". [173] [174] [175]


Branch-per-issue or Feature (i.e. "User Story" in Agile), but this time branching off of a "develop" branch which gets synched with changes (hotfixes) down from "master" as soon as possible. We can cut a "release" branch off of the "develop" branch when a significant enough amount of work has been Code Reviewed through a Pull Request (PR), giving us a release candidate that gets merged into "master". If any changes whatsoever occur in "release" they must be merged down to "develop" as well to ensure consistency.

The main goal is to keep "master" releasable (aka. ever-green), while also separating bug fix type of work from new feature development or project work.

[177] [178] [179] [180] [181] [182] [183] [184] [185] [186] [187] [188] [189] [190]

Gitflow 2.0

Branch-per-issue or Feature (i.e. "User Story" in Agile), but differing from the first Gitflow proposal because now we branch any long-lived (lasting a Sprint or longer) features being developed, off of a project-specific "develop/project" branch which originates off of the "master" branch rather than a single long-lived "develop" branch. Then we cut our "release" branches directly off of the "develop/project" branches as they are completed, giving us a release candidate for production which needs to get synched with any changes (hotfixes) down from "master" as soon as they are made.

The main goal is still to keep "master" releasable (aka. ever-green) but the secondary goal is to also prevent any unwanted code from the project branches getting merged (i.e. unfinished work, half-baked feature, feature intentionally being withheld).

[199] [200] [201] [202] [203] [204] [205] [206] [207] [208] [209] [210] [211]


A term coined by Operations engineers at WeaveWorks (and possibly elsewhere in the SRE/DevOps communities) following and promoting the philosophy of "versioning everything that moves/changes" or in other words "Everything-as-code" (i.e. Configuration-as-Code, Infrastructure-as-Code, Network-as-Code, Database-as-Code, Pipeline-as-Code, etc). In particular, the "GitOps movement" tends to gravitate towards git as the preferred SCM tool due to its flexibility and powerful history/branching/commit models it enables.

[212] [213] [214]



[222] [223] [224] [225] [226] [227] [228] [229] [230] [231] [232]





[242] [243]

External Links

[249] [250] [251] [252] [253] [254] [255] [256] [257] [258] [259] [260]


  1. Gitorious was acquired by GitLab in 2016:
  2. GitLab Opens CI/CD to GitHub Users:
  3. Continuous Integration with Jenkins and GitLab:
  4. GitLab pricing:
  5. GitLab - Feature Comparison:
  6. GitHub vs. Bitbucket vs. GitLab vs. Coding:
  7. The Key Differences -- GitLab vs GitHub vs BitBucket:
  8. Basic comparison of "GitLab vs GitHub vs BitBucket":
  9. GitLab Outlines Scope of DevOps Ambitions:
  10. GitLab Raises $268M to Expand its Leading DevOps Platform to Security, Monitoring, and More:
  11. 1 in 3 Fortune 500 companies agree -- Bitbucket is the Git solution for professional teams:
  12. Bitbucket Server Download Archives:
  13. Atlassian supported Jenkins integration for Bitbucket Server:
  14. Atlassian announces "journey to the cloud" migration: (BitBucket Server/Stash to be made EOL, BitBucket Data Center to have sizable price increase, only recommended for very large organizations with bespoke implementations going forward with most companies likely to move to Atlassian cloud offerings)
  15. Atlassian cloud shift quickens with Data Center price hikes:
  16. Announcement -- End-of-life for Bitbucket Server hosting on Windows:
  17. Atlassian cloud sweetens licensing deal for enterprises:
  18. Atlassian cloud woos enterprises with SLA, security boost:
  19. Observations On The Atlassian Outage:
  20. Migrate from Stash to Bitbucket:
  21. Atlassian Stash or BitBucket for Git integration?: (head-to-head feature comparison from 2014, just before the Atlassian merger & acquisition)
  22. How to mirror Bitbucket Cloud and GitHub repositories to Bitbucket Server (Stash):
  23. Sync from BitBucket to Stash:
  24. How to properly mirror a git repository:
  25. Forking a Repository in BitBucket Cloud:
  26. BitBucket - ActiveDirectory & LDAP integration:
  27. Awesome Graphs for Bitbucket: | BitBucket | Stash (visualized statistics for Git and Mercurial repositories)
  28. The new Bitbucket webhooks:
  29. Troubleshoot Webhooks:
  30. Tutorial -- Create and Trigger a Webhook:
  31. BitBucket + Jenkins via WebHooks:
  32. BitBucket Server (Stash) plugin for Jenkins:
  33. Configure Bitbucket hook for jenkins:
  34. BitBucket Jenkins integration:
  35. Integrate with BitBucket -- build after each commit:
  36. SourceTree password after opening Bitbucket account with gmail:
  37. What to do if you've committed sensitive data to a Bitbucket Cloud repository:
  38. Bitbucket Pipelines FAQ: (a replacement for Bamboo Cloud; "CI server" - Bamboo still exists as standalone self-hosted Bamboo Server version - that grew out of Atlassian research into GIT Workflows)
  39. Bamboo Cloud - "End Of Life" announcement (replaced by BitBucket Pipelines):
  40. Bamboo Cloud - glossary: (many similarities to list of supported terms in BitBucket Pipeline)
  41. An inside look at Bitbucket Pipelines, now with team variables:
  42. Git Workflows a-la-carte:
  43. BitBucket -- Language Guides:
  44. Bitbucket Pipelines Provides Continuous Delivery within Atlassian’s Bitbucket Cloud:
  45. Increment a number in Bitbucket Pipelines:
  46. Unable to resolve dependency when the artifact is in a private repository/installed manually:
  47. BitBucket Jenkins Continuous Integration - Webhook & ngrok:
  48. Notifications for Bitbucket Pipelines:
  49. Troubleshoot connections with Jira applications:
  50. Connect Bitbucket Cloud to Jira Software Cloud:
  51. JIRA-BitBucket integrations:
  52. Environment variables in BitBucket Pipelines:
  53. Tips for scripting tasks with Bitbucket Pipelines:
  54. Bitbucket pipeline - possibility to merge one branch to another:
  55. Increment a number in Bitbucket pipelines:
  56. Build number that increments on every build: ($BITBUCKET_BUILD_NUMBER now available)
  57. Add structure to your pipeline with multiple steps in Bitbucket Pipelines:
  58. BrowserStack - Bitbucket Pipelines test integration:
  59. Configuring BitBucket Pipelines:
  60. Analyze Code with Code Climate (Pipelines integration):
  61. How to access my local repository (from within a Pipeline):
  62. BitBucket Pipelines + BrowserStack integration:
  63. BitBucket Pipeline tasks:
  64. Building a Bitbucket Pipe as a casual coder:
  65. Run a set of command on deployment server after bitbucket pipeline push?:
  66. YAML anchors support in BitBucket Pipelines: (keep DRY with named "repeatable steps")
  67. Limit Bitbucket pipelines to specific branches:
  68. Bitbucket Pipelines share some steps (to achieve DRY) between branches:
  69. Branch workflows in BitBucket Pipelines:
  70. Using artifacts in steps:
  71. Test reporting in Pipelines:
  72. Bitbucket Pipeline fails saying that step is empty, null or missing:
  73. Debug your pipelines locally with Docker:
  74. Troubleshooting Bitbucket Pipelines:
  75. Incomplete error message in Pipelines:
  76. Fix "package 'chromium-browser' has no installation candidate" error in Docker containers: (by first installing all required depedencies)
  77. How to configure the CHROME_BIN in pipeline:
  78. Chrome remote installation:
  79. Example demonstrating using Puppeteer to launch a headless Chromium instance for headless browser testing inside Bitbucket Pipelines:
  80. Running Lighthouse using headless Chrome:
  81. environment variable CHROME_PATH must be set to executable of a build of Chromium:
  82. Continuous Testing at scale: The new mabl and Bitbucket Pipelines CI/CD integration:
  83. How to configure Bitbucket Pipelines for an Android project:
  84. It’s official! Announcing Runners in Bitbucket Pipelines:
  85. Configure your runner in bitbucket-pipelines.yml:
  86. Branching a Repository:
  87. Workflow for Git feature branching:
  88. Using branches in Bitbucket Server: (Configuring branching models --> Branch types)
  89. Introducing code-aware search for Bitbucket Cloud:
  90. What are the Bitbucket Cloud IP addresses I should use to configure my corporate firewall?:
  91. Branch permission patterns:
  92. Bringing you speed, power and flexibility with 12 new features in Bitbucket Pipelines:
  93. Atlassian -- Stash/BitBucket-JIRA Integration Plugin (REST Resources):
  94. Get commits info of a JIRA issue using REST API:
  95. Syncing and merging come to Bitbucket:
  96. BitBucket-JIRA integration:
  97. Use Smart Commits:
  98. Smart Commits -- apply only for specific branches?:
  99. Is there any Bitbucket Pipeline API available? :
  100. BitBucket Pipelines API -- trigger a pipeline remotely, query about past runs, etc:
  101. fatal: bad revision when using git log with BITBUCKET_COMMIT:
  102. How to keep DRY with BitBucket-Pipelines?:
  103. How to integrate Android project deployment to Hokeyapp with Bitbucket Pipelines:
  104. Permission denied from Bitbucket Pipeline:
  105. Trigger Pipeline (from a BitBucket Pipeline):
  106. Confidence to release early and often -- Introducing Bitbucket Deployments:
  107. yCombinator News -- Atlassian announces Bitbucket Deployments:
  108. Atlassian announces Bitbucket Deployments: Giving teams confidence to release early and often:
  109. Deploy build artifacts to Bitbucket Downloads:
  110. Deploying websites to FTP or Amazon S3 with BitBucket Pipelines:
  111. Getting a download from BitBucket with Curl (wget doesn’t work):
  112. Download private BitBucket repository zip file using http authentication:
  113. Unable to download files hosted on Bitbucket after OAuth setting credentials: (things learned while troubleshooting)
  114. Is it possible to use multiple docker images in bitbucket pipeline?:
  115. Javascript (Node.js) with Bitbucket Pipelines:
  116. Use Docker images as build environments:
  117. BitBucket Pipelines - YAAT CI/CD (PRESENTATION): (Yet Another Approach To Continuous Integration & Continuous Delivery)
  118. Debug your pipelines locally with Docker:
  119. Example "bitbucket-pipelines.yml" for LAMP (PHP & MySQL) project:
  120. Building and pushing Docker images:
  121. How do I set up ssh public-key authentication so that I can use ssh, sftp or scp from my Bitbucket Pipelines pipeline?:
  122. Use SSH keys in Bitbucket Pipelines: (a crucial step is to create the my_known_hosts file and add it to your repo)
  123. Problem getting BitBucket Pipelines to commit back version change to its own GIT repo: (MY QUESTION)
  124. Increment a number in Bitbucket pipelines:
  125. How can I use SSH in Bitbucket Pipelines?:
  126. BitBucket Cloud docs -- Push back to your repository:
  127. BitBucket community -- Push back to remote from Pipelines:
  128. Trouble with SSH and Bitbucket Pipelines:
  129. Using artifacts in BitBucket Pipelines build steps:
  130. Run BitBucket Pipelines manually:
  131. Enhance Deployments to support flexible environments:
  132. Customize your deployment environments:
  133. Git Large File Storage in Bitbucket:
  134. Use Git LFS with Bitbucket: (limited to 1GB files for Free account, 5GB files for regular, 10GB files for Premium; up to 100GB "extra file storage" can be "purchased")
  135. What kind of limits do you have on repository/file/upload size?:
  136. Push back to remote from Pipelines:
  137. Ability to run a set of commands before every pipeline, like "before_script" in gitlab-ci:
  138. How can I configure my pipeline to control versioning? :
  139. How can I add code to a numeric list's item without breaking the numbering?:
  140. Markdown -- continue numbered list:
  141. New IP addresses for Bitbucket Cloud:
  142. How Bitbucket enriches their Slack app UX with user mapping:
  143. Meet Bitbucket Cloud’s new chatbot:
  144. BitBucket Cloud .vs. BitBucket Server (Stash) - Feature matrix:
  145. Atlassian's perspective on Bitbucket Cloud .vs. GitLab Cloud:
  146. Atlassian's perspective on Bitbucket Server (Stash) .vs. GitLab Server:
  147. 6 new Bitbucket Cloud features that spark joy:
  148. BitBucket Cloud -- Set email aliases:
  149. Map existing commits to username aliases:
  150. Continuous Integration -- A Complete Guide to Using BitBucket Pipelines With Maven Repositories:
  151. Squash commits when merging a Git branch with Bitbucket:
  152. I can not commit my Git LFS files to BitBucket: (common cause is size of commit/file too big, or, error due to VPN/Proxy/Firewalls)
  153. Broken pipe when pushing to git repository:
  154. Windows - Fail to clone repository with git lfs and large files > 5GB: (run the following: git lfs install --skip-smudge then git clone <URL> then git lfs pull lastly git lfs install --force)
  155. Adding a new SSH key to your GitHub account:
  156. 15 Tips to Enhance your Github Flow:
  157. Issue and Pull Request templates:
  158. A bright future for GitHub:
  159. Microsoft + GitHub = Empowering Developers:
  160. When GitHub met Microsoft: Good for enterprise DevOps?:
  161. How GitHub Democratized Coding, Built a $2 Billion Business, and Found a New Home at Microsoft:
  162. Game Of Codes -- Reasons Why Developers Use Only Three Repositories:
  163. GitHub Draft Pull Requests Enable New Collaboration Workflows:
  164. Customizing your GitHub profile - Scripting:
  165. Customizing your GitHub profile - Building: (automated builds within GitHub using "GitHub Actions")
  166. GitHub abandons 'master' term (using "main" in its place) to avoid slavery row:
  167. Git password authentication is shutting down:
  168. Token authentication requirements for Git operations:
  169. GitHub deprecates account passwords for authenticating Git operations:
  170. Proactively prevent secret leaks with GitHub Advanced Security secret scanning:
  171. Dependabot alerts now surface if your code is calling a vulnerability:
  172. Git branching -- master vs. origin/master vs. remotes/origin/master:
  173. Use Sourcetree branches to merge an update:
  174. Merge or Rebase?:
  175. Git Rebase .vs. Git Merge explained:
  176. GitFlow -- what is difference between release and master branches?:
  177. Gitflow - the easy release management workflow:
  178. Git Flow Workflow:
  179. Learn Version Control with Git & Gitflow:
  180. Git branching done right with Gitflow & improving code quality with code reviews:
  181. Git Flow Versioning:
  182. Make Jenkins speak Git Flow:
  183. A real-life git workflow. Why git flow does not work for us:
  184. Still using GitFlow? What about a simpler alternative?:
  185. Git & gitflow - commands quick reference:
  186. A practical take on GitFlow and Semantic Versioning:
  187. Gitflow — Branch Guide:
  188. 30 Days of DevOps (at NTT Data group) - Gitflow vs Github flow:
  189. Trunk-based Development vs. Git Flow:
  190. Gitflow considered harmful:
  191. GitHub Flow (inspried by git-flow):
  192. Five tips for CI-friendly Git repos:
  193. What is the difference between `git merge` and `git merge --no-ff`?:
  194. “Merge pull request” Considered Harmful:
  195. What is AVH??: (ANSWER: AVH="A Virtual Home", the author of the fork's blog from which he customizes software)
  196. Git or SVN? How Nuance Healthcare chose a Git branching model?: (they chose Gitflow)
  197. GitFlow practical uses of branches over time:
  198. A short introduction to Git Flow:
  199. A successful Git branching model considered harmful:
  200. Understanding the "GitHub flow": (significantly simpler than full "gitflow"... basically advises feature branches that release then merge back to mainline branch)
  201. Trunk-based Development:
  202. git-bisect - Use binary search to find the commit that introduced a bug:
  203. git-gc - Cleanup unnecessary files and optimize the local repository:
  204. Please stop recommending Git Flow!:
  205. HackerNews -- Please stop recommending Gitflow:
  206. Gitflow is a Poor Branching Model Hack:
  207. Git flow for agile teams is a no no:
  208. GitFlow considered harmful:
  209. GitFlow is anti-agile:
  210. Gitflow Agile Tweak:
  211. Enhanced Git Flow Explained:
  212. GitOps -- ‘Git Push’ All the Things (review of the presentation):
  213. GitOps 101 -- What Is GitOps, and Why Would You Use It?:
  214. Is GitOps the next big thing in DevOps?:
  215. Giggle - A graphical (Ubuntu) frontend for the git content tracker:
  216. How to disable Git Credential Manager for Windows?:
  217. ignoring any 'bin' directory on a git project:
  218. SourceTree for Windows 2.0: New UI, faster performance, and Microsoft Git Virtual File System support:
  219. sourcetree won't open - error:
  220. Cannot clone a repository from Github using Sourcetree, embedded git command line works perfectly:
  221. About git path for Sourcetree -- resolve the "template not found" warnings: (FIX is to add [init] templatedir = C:/Users/<USERNAME>/AppData/Local/Programs/Git/mingw64/share/git-core/templates to "C:/Users/<USERNAME>/.gitconfig", where the "[init]" part appears above followed by a linebreak... on Mac use [init] templatedir = /Applications/ )
  222. Can't install Sourcetree on Windows 10:
  223. Sourcetree keeps asking for bitbucket password on Windows:
  224. Sourcetree keeps asking for login and password on MAC:
  225. Unbundle Git-LFS and git-flow dependencies in Sourcetree:
  226. Sourcetree 2.6.10 ArgumentException encountered. An item with the same key has already been added :
  227. Error "An item with the same key(...)" when pulling / pushing from Azure DevOps:
  228. Sourcetree 2.6.10 ArgumentException encountered. An item with the same key has already been added : (suggests downgrading System GIT from 2.19.1 to 2.19.0... OR... upgrading just Git Credential Manager to a patch version until the fix gets bundled in a new "msysgit" release)
  229. Sourcetree keeps asking for bitbucket password on windows :
  230. In SourceTree, how do I squash commits?:
  231. SourceTree log file location:
  232. SourceTree on Windows is not prompting for password when connecting to git repository:
  233. Git - SVN users' Crash Course guide: (backup of main link)
  234. Choosing a Git Branching Strategy:
  235. MSysGit -- InstallMSysGit step-by-step: (NOTE: msysgit project has been partially integrated into "GIT for Windows" then phased out)
  236. Getting Started - Git Basics:
  237. Git Server Like GitHub? [closed]:
  238. My Git Workflow:
  239. The Thing About Git:
  240. How I stopped missing Darcs and started loving Git:
  241. Git Forks and Upstreams -- How-to and a cool tip:
  242. Top 20 Git Commands With Examples:
  243. 35 GIT commands with examples:
  244. Basic Branching and Merging:'
  245. A Tutorial on Git Merge:
  246. How to checkout a previous Tag in Git:
  247. Git Basics - Tagging:
  248. Don’t Fear The Rebase:
  249. Don't Be Scared of git rebase:
  250. A Git Workflow Using Rebase:
  251. Master the Rebase (and the Other Way Around):
  252. The Git Rebase Introduction I Wish I'd Had:
  253. How I got over my irrational fear of git:
  254. Git, Feature Branches, and Jenkins – or how I learned to stop worrying about broken builds:
  255. A Git Workflow for Agile Teams:
  256. A Rebase Workflow for Git:
  257. A rebase-based workflow:
  258. How to make Git pull use rebase by default for all my repositories?:
  259. System.ComponentModel.Win32Exception - The System cannot find the file specified error message usually just means GIT can't be found:
  260. Opening repositories fails with System.ComponentModel.Win32Exception: The system cannot find the file specified: (switch to separate "embedded GIT" if problem persists)
  261. Linus Torvalds on GIT merge .vs. rebase -- Re: [git pull] drm-next:
  262. What GIT branching model works for you?:
  263. Squash several Git commits into a single commit:
  264. How to use git merge --squash?:
  265. Squash my last X commits together using Git:
  266. How to squash commits in git after they have been pushed?:
  267. In git, what is the difference between merge --squash and rebase?:
  268. GIT -- How to squash several commits that have been pushed to a remote repo?:
  269. Cherry-pick automation with Bash:
  270. Setting up a git remote origin:
  271. GitHub guide to adding a remote:

See Also