Having trouble learning git? start with Git Flow.

I created an example for you to use git flow below.

but firstly you need to have gitflow installed on your computer.

do brew install git-flow

then follow the rest of the tutorial below.

Gitflow Tutorial

set -o verbose
set -o errexit

echo '* Create and initialize a repository.'
git init gitflow-tutorial
cd gitflow-tutorial/
git flow init -d

echo '* Develop a Feature'

echo 'Make a feature branch.'
git flow feature start awesome-thing

echo 'Commit a change.'
touch file1.txt
git add .
git commit -m 'Implemented an awesome thing.'

echo 'Merge commits from develop and upstream.'
git rebase develop

Manage conflicts by amending your commits if needed.

echo 'Merge the feature.'
git flow feature finish awesome-thing

echo '* Create a Release'

echo 'Start the release.'
git flow release start v1.0

echo 'Perform release specific changes.'
echo 'v1.0' > version.txt
git add .
git commit -m 'Added version file and set initial v1.0 version.'

echo 'Complete the release.'
git flow release finish -m 'v1.0' v1.0

echo '* Hotfix the release'
git flow hotfix start v1.0.1
echo 'v1.0.1/' > version.txt
git add .
git commit -m 'Updated version file to v1.0.1.'
git flow hotfix finish -m 'v1.0.1' v1.0.1
Show your support

Clapping shows how much you appreciated Shaun Stanislaus’s story.