[IMPORTANT] [GIT] Updated branch ref pointers

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5511
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1379

[IMPORTANT] [GIT] Updated branch ref pointers

Post by dark_sylinc »

The repo was set up to have 'v2-2' and 'master' (which contained 2.1)

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
If you were on master (aka 2.1):

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
chchwy
Kobold
Posts: 30
Joined: Fri Feb 10, 2017 1:40 am
x 11

Re: [IMPORTANT] [GIT] Updated branch ref pointers

Post by chchwy »

Good news.

Don't have to see this weird message again "This branch is 3525 commits ahead, 3339 commits behind OGRECave:master"