I am using curl command to manually add artifacts in the nexus repository. What will happen in the case if I reupload the artifact of the same version which is already present in the nexus repo. Does it replace the previous one or not push at all in the repo?
It depends on the settings of the repository.
If the "Deployment policy" is set to "Allow redeploy" then if the artifact reuploaded it will replace the original artifact
If the "Deployment policy" is set to "Disable redeploy" then if the artifact reuploaded it will result in an error.