[Core] Use fugitive to pull the code and hard the branch name (fixes

Improve the function to pull the code, use fugitive and hard the master branch.