Skip to content

Instantly share code, notes, and snippets.

@kjunggithub
Last active July 18, 2024 02:34
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 Cheat Sheet for Cosmo Developers
## Preparing the repository
If this is a new repository, create it on GitHub, then create a remote **develop** branch.
Clone the repository to your local machine using command line or **Github Fow Windows** GUI:
```
git clone https://github.com/CloudifySource/repo_name.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
<table>
<tr><th> Syntax </th> <th> Description </th></tr>
<tr><td> <code>git hf feature start feature_name</code> </td> <td> Start a new feature called <b>feature_name</b> (you need to pull changes to your local develop branch first) </td></tr>
<tr><td> <code>git hf feature track feature_name</code> </td> <td> Join the <b>feature_name</b> feature which has already started </td></tr>
<tr><td> <code>git hf feature checkout feature_name</code> </td> <td> Switch to the <b>feature_name</b> feature (useful when working on multiple features) </td></tr>
<tr><td> commit </td><td> Commit changes to the local feature branch using your favourite tool (IDE, command line, TortoiseGit, etc)</td></tr>
<tr><td> <code>git hf push</code> </td> <td> Push committed changes to the remote feature branch for collaboration or backup </td></tr>
<tr><td> <code>git hf pull</code> </td> <td> Pull changes made by others from the remote branch</td></tr>
<tr><td> <code>git hf update</code><br/><code>git merge develop</code></td> <td> Update the local <b>develop</b> branch with completed features and merge them into the local feature branch</td></tr>
<tr><td> <code>git hf feature submit</code> </td> <td> Submit a pull request to merge the remote feature branch into the remote <b>develop</b> branch</td></tr>
<tr><td> <code>git hf feature finish</code> </td> <td> Delete the local & remote feature branches after it has been merged back to the remote <b>develop</b> branch</td></tr>
<tr><td> <code>git hf feature cancel -f feature_name </code> </td> <td> Delete the local & remote feature branches without merging to the remote <b>develop</b> branch</td></tr>
</table>
@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