Skip to content

Instantly share code, notes, and snippets.

@abhishekprajapati1
Last active October 1, 2024 11:32
Show Gist options
  • Save abhishekprajapati1/767525dd5b4e65e1cf66e6aed74efbdd to your computer and use it in GitHub Desktop.
Save abhishekprajapati1/767525dd5b4e65e1cf66e6aed74efbdd to your computer and use it in GitHub Desktop.
Git Work Flow

GitHub & Jira Collaboration

Step-1: Pick an issue/feature

Go to Jira and select an issue/feature you want to work on from the board. Click on it and you will be presented with the detailed view. Find development option from the very right panel of this detailed view. There you will find create-branch command. Copy the command.

Step-2: Create branch

Open you projects' root directory in terminal and make a pull git pull. Make sure you are running pull command from within main branch. Then paste the command you copied from jira ( it should be something like git checkout -b <branch_name> ) and hit enter. Now you are in your new branch where you should code for that issue/feature only.

Step-2: Let them know

Once you are done with coding and testing. This is the time to let the reviewers know. So you will have to push your local branch on remote. To do this follow these commands:

  • git add <file_name> // adds a file in staging area.
  • git add . // adds all files in staging area. you should prefer this.
  • git commit -m "type your commit message here"
  • git push -u <remote_name> <branch_name>

Step-3 Create a PR

Once you pushed the branch on remote. Go to github.com and open your project's repository.There, navigate to your branch, you will find this on the very top of the file structure. image Click on contribute button and you will see a dropdown like below.

image

Just click on Open Pull Request button. Once you opened pull request it should be visible in the pull requests tab. And that's it.

IMPORTANT You should keep checking for any reviews on you pull requests. Try enabling notifications and email to get notified about updates on your pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment