ElkArte Community

Project Support => General ElkArte discussions => Topic started by: Ant59 on November 12, 2014, 05:53:13 am

Title: Git Scrambled Branches
Post by: Ant59 on November 12, 2014, 05:53:13 am
I just attempted to pull from the Elkarte repo to update my fork, but it appears the branches have been scrambled. Git has gone ahead and pulled from Elk's "development" branch into my "master" branch. What's going on?
Title: Re: Git Scrambled Branches
Post by: emanuele on November 12, 2014, 08:36:34 am
What git client are you using? (To understand what it is doing.)

The only thing changed in the last period (several weeks ago, while working on 1.0.1 release) is that the development branch has been made the "default" at github. That should only mean that development is the branch shown on the home page instead of master, but that shouldn't affect already existing repository... unless some git clients is not using the default github branch to know what to pull, but the "default branch" at github (that would be "slightly" wrong TBH)., and that's the reason of my question about your client.
Title: Re: Git Scrambled Branches
Post by: Ant59 on November 12, 2014, 09:23:20 am
I'm using Git 1.7.9.5 from the Debian repo.
Title: Re: Git Scrambled Branches
Post by: emanuele on November 12, 2014, 09:39:32 am
CLI one?
Title: Re: Git Scrambled Branches
Post by: Ant59 on November 12, 2014, 02:38:17 pm
Yeah
Title: Re: Git Scrambled Branches
Post by: emanuele on November 12, 2014, 04:45:14 pm
hmm... no idea... :-\
This is odd.

Well, unless you committed something to master you can just:
Code: [Select]
git checkout development
git branch -D master
git fetch elkarte (or the name of the remote)
git checkout elkarte/master
git checkout -b master
git push -f origin master
in other words drop and re-fetch master and force-push it.

And not to forget: