Я не знаком с Java, поэтому могу просто давать команды без cd
.
git init /temp/tmp/dir
# create tmpfile.txt in /temp/tmp/dir
git --git-dir=/temp/tmp/dir/.git --work-tree=/temp/tmp/dir add tmpfile.txt
git --git-dir=/temp/tmp/dir/.git commit --message "adding tmp file"
# your question says without adding remote, so we skip "git remote add"
git --git-dir=/temp/tmp/dir/.git push https://nickname@bitbucket.org/nickname/repo-name.git HEAD:refs/heads/tmp-branch