Jenkins Not pulling the latest commit into master or slave
You can use a plugin called &quot;Workspace Cleanup Plugin&quot; which wipes out the workspace post build. This can be a part of the pipeline and would not require manual cleanup every time when a build should be triggered.

For the second issue, I would recommend you to check if you're able to checkin to the same repository with git credentials configured in jenkins settings through the command line in the slave.