However this goes against common conventions of having the latest development version always on stable, and the stable/older ones in a separate named branch.
Hence I destroyed the branch 'v2-2', added 'v2-1' and master now points to where v2-2 pointed.
If you've already cloned your repo and pull, this could wreak havoc
If you're confused by git, I suggest you clone the repo again.
If you're experienced with git or you don't have good bandwidth to download the repo again, do not perform a pull. Instead type:
If you were on v2-2:
Code: Select all
# Delete local master
git branch -d master
# Retrieve changes
git fetch
# Force to point HEAD to origin/master
git reset --hard origin/master
# Create local branch master tracking origin/master and check it out
git checkout -b master origin/master
# Delete local branch that was removed in origin
git branch -d v2-2
Code: Select all
# Retrieve changes
git fetch
# Force to point HEAD to origin/v2-1
git reset --hard origin/v2-1
# Create local branch v2-1 tracking origin/master and check it out
git checkout -b v2-1 origin/v2-1
# Delete local branches that are dirty or disappeared
git branch -d master
git branch -d v2-2
git fetch