Skip to main content

Posts

Showing posts with the label Git

git cherry-pick [commit]

Customer Needs My team already had a go-live app in a customer environment some months ago. We have been developing some new features for our next milestone. The situation is described in the picture below: We used Git for our codebase management. The go-live app running on our customer environment was at version ` v1 `. The latest sprint release was at version ` v7 ` for our developing app. Our customers wanted to have two separated release packages for our current sprint release. We all know that it was easy to ship the package to the developing app. However, the issue was that how we just picked some features needed for the go-live app. We called this package was a hotfix. Git Cherry-Picking Fortunately, we found that Git provided a way to achieve this task. Actually, we had all commits on the branch ` master ` already. We created a new branch called ` hotfix/v1.1 ` and we traced back which commits needed. We used cherry-picking for merging these commits to this branch....

Git Feature Branch Workflow

Motivator It's important for a team to have an agreement on how the changes of source code should be applied. According to projects and teams size, we will define a workflow or select one from recommended workflows ; the "Feature Branch Workflow" is a candidate. What is it? - One branch "master" for main codebase - Several separated branches for features development Why should we care? - Be super simple and allow each developer works on a particular feature. - A stable codebase (master) benefits for continuous integration (CI) environment - Leverage "Pull request" for Code review How it works? A lifecyle of a feature branch (usually created by a story) 1. Creator creates a new branch from a story.  For example: "ABC-1-setup-projects" 2. Creator checkouts the created branch and works on the branch (commits, pushes) 3. Creator has done the feature, he uses "pull request" to merge his branch into branch "master...

Today I Learned - Git at First Glance

Getting Started It's always fun to jump right in to the "HelloWorld" app. Just go for it! Visit: https://try.github.io/levels/1/challenges/1 Cheatsheet It's time for us to store our "magic tools". Visit:  https://www.git-tower.com/blog/git-cheat-sheet Which collaboration way fit your team? Git is just a tool which doesn't teach you how to work properly in a team. It depends on your projects and you need to choose your own team workflow. Visit: https://www.atlassian.com/git/tutorials/comparing-workflows