I have a Git repository with a branch that hardly ever changes (nobody else is contributing to it). It is basically the master branch with some code and files stripped out. Having this branch around makes it easy for me to package up a leaner version of my project without having to strip out the code and files manually every time.
I have been using git rebase
to keep this branch up to date with the master but I always get this warning when I try to push the branch after rebasing:
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again. See the 'Note about
fast-forwards' section of 'git push --help' for details.
I then use git push --force
and it works but I feel like this is probably bad practice. I want to keep this branch "in sync" with the master quickly and easily. Is there a better way of handling this task?
Update
See this topic for a full explanation and solution:
http://stackoverflow.com/questions/559917/git-rebase-and-git-push-non-fast-forward-why-use