Skip to content

Instantly share code, notes, and snippets.

@hussfelt
Forked from kjunggithub/gist:8330157
Last active December 10, 2023 12:46
Show Gist options
  • Save hussfelt/911c58fd668ba422b688 to your computer and use it in GitHub Desktop.
Save hussfelt/911c58fd668ba422b688 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 [email protected]: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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment