I added my files to local respository, committed the add then removed the files. I wasn't logged into gitlab at the time. how can I revert it?
You can use the git reflog and checkout the last commit where your files exists and commit it again.
git reflog
git checkout HEAD@{...}