Skip to content

Instantly share code, notes, and snippets.

@kjunggithub
Last active May 30, 2022 03:40
Show Gist options
  • Save kjunggithub/8330157 to your computer and use it in GitHub Desktop.
Save kjunggithub/8330157 to your computer and use it in GitHub Desktop.
git hubflow cheaetsheet

Git HubFlow Cheat Sheet

Preparing the repository

Create the repository on GitHub/Bitbucket. Once created, clone the created repository to your local machine using:

git clone git@github.com:username/repository.git

CD into the repository folder and run the init command to enable to hub flow tools:

cd repo_name
git hf init

Feature Lifecycle

Syntax Description
git hf feature start feature_name Start a new feature called feature_name (you need to pull changes to your local develop branch first)
git hf feature track feature_name Join the feature_name feature which has already started
git hf feature checkout feature_name Switch to the feature_name feature (useful when working on multiple features)
commit Commit changes to the local feature branch using your favourite tool (IDE, command line, TortoiseGit, etc)
git hf push Push committed changes to the remote feature branch for collaboration or backup
git hf pull Pull changes made by others from the remote branch
git hf update
git merge develop
Update the local develop branch with completed features and merge them into the local feature branch
git hf feature submit Submit a pull request to merge the remote feature branch into the remote develop branch
git hf feature finish Delete the local & remote feature branches after it has been merged back to the remote develop branch
git hf feature cancel -f feature_name Delete the local & remote feature branches without merging to the remote develop branch
@unr
Copy link

unr commented Dec 22, 2015

💯 for kjung ❤️

@azimidev
Copy link

azimidev commented Sep 8, 2021

submit doesn't work for me it says:

Fetching origin
Aborting submission due to empty summary.

without letting me add a text using my editor even tho i have -w flag enabled

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