Skip to content

Latest commit

 

History

History
70 lines (39 loc) · 2.75 KB

GIT-IT.md

File metadata and controls

70 lines (39 loc) · 2.75 KB

Giting it. Start here.

<<<<<<< HEAD

Important: When creating a branch from an issue please rename the README.mdto avoid conflicts with the main branch.

46fe1b5 (Update GIT-IT.md.)

There are basically three categories of issues;

  1. Feature: May require the creation of a branch, especially if issue title is too broad. e.g. Create visualization site.
  2. Major: An issue that affects many parts of the project and needs to be fixed ASAP. Could be a bug / tool issue.
  3. Minor: There's no need to panic about this issue.

Working with issue-based branches 🎋

Lets say you want to work on a feature issue for example; JDA-12: Build working visualization site

1. Create a branch of our main repo

Create a branch ofjobs-data-analyzer via a JIRA issue panel see image below;

Create a new branch via JIRA

2. Clone the branch

Choose HTTPS, SSH, copy the link and clone the branch;

clone issue branch

Clone the branch: git clone -b JDA-12 git@github.com:StackBreakthrough/jobs-data-analyzer.git

cd into the folder and work on your branch

Work on it

Shortcut

You could also could've simply created the branch from main via your command line ( assuming you initially cloned the main branch );

git checkout -b JDA-12

and switched to it for the following steps. ¯_(ツ)_/¯

Step 1

Add and commit your changes to your branch JDA-12 in this case.

Add and commit changes

Step 2

Then checkout the main branch and merge it with your branch, JDA-12 in this case;

Checkout and merge

Step 3

You have a number of options;

  1. git push origin main or switch back to your branch (JDA-12) and add more stuff, or push what you already have in that branch to its remote;
  2. git switch JDA-12
  3. git push origin JDA-12

Another way to merge your changes with the main branch

If this seems like a long process then you might consider just pushing your changes to your remote branch. Then use Github's pull request to merge it with the main branch.