My master copy has previous files checked in 2years back. My development branch is up-to date. So i want to update my master branch with development branch.
git checkout master
git merge -X theirs dev
but it gives an error "can something which we cannot merge"
In the Git web when i tried to create a new pull request, it shows like this "There isn’t anything to compare.
master and master-clean are entirely different commit histories."
Did you mean Origin/Development?
So, gathering the info from all your comments and your OP, you have this situation:
masterbranch and a current
developmentbranch. Let's call this repository
masterand replace it by the
origin, i.e. you have committed everything you changed in
So I suggest this procedure:
git checkout development ; git pull # just in case git branch master development -f git checkout master git push origin master -f
developmentbranch with the remote one, just in case. After this operation, they should be exactly the same.
git statusshould tell you this clearly.
masterto point to the same commit as
masterto the remote, overwriting whatever it was before.
origin/master all point to the same commit, which is whatever your
development was beforehand.