I am new to git and I am familiar with the regular git clone, develop, commit, push workflow. In one of the tutorials I watched, I noticed the developer doing the following:
git init
git fetch ssh://someserver.git refs/data/val
git checkout FETCH_HEAD
.
. make changes to files
.
git commit -am "somemessage"
git push ssh://someserver.git HEAD:refs/data/val
Could someone help to explain:
- What workflow is being followed here? What could be the reason of doing this without cloning?
- What is the meaning of
refs/data/val
in thegit fetch
command?
NOTE: This is not to understand what FETCH_HEAD is. So it is not a duplicate.