I understand the logic behind that but can i update for both of the OS at the same time?
I'm not sure what you mean. Basically, you have to upload a separate XAP for WP7 and for WP8. I recommend keeping a copy of your WP7 Visual Studio project before upgrading it, just in case you want to publish a bug fix or something for the WP7 version of your app.
In the DevCenter, when submitting an update, all the XAPs available for your application are listed. You can click on "Add new" to add a XAP for a different version of the OS. Use "Replace" to update an old XAP for a specific version of the OS. This way, you can independently update your WP7 and WP8 versions. You can't update both at once (meaning, upload a single XAP and use it for both versions of the OS) since WP7 isn't forward-compatible.