I have checked out gh-pages branch. I try git merge master
and I receive the following "error: The following untracked working tree files would be overwritten by merge: ... Please move or remove them before you can merge." That's exactly what I want to do. I want the files on the master branch to override the versions of those same files on the gh-pages branch. I have read up a little on versions of the git rm...
command and also tried git stash
and git reset head
. I still get the same error.
In short, how do I ignore the current status of gh-pages and overwrite them with master branch?
If you don't want to keep the current untracked files in your working tree for
gh-pages
then you could blast them away and perform the merge:If you do want to keep those files you can
add
thencommit
them, and then do thegit merge master
You have some untracked files on your current branch that are versioned on master branch. Merging master (or checking out master) would overwrite them without the possibility to reverse that. Git always tries to prevent you from loosing data that cannot be restored until you explicitly told it to do so. Here are the things you can do:
and probably many other things to get rid of them.