gitless
gitless copied to clipboard
How to download a remote branch ?
The gl init command downloads all the branches. In my case I want to copy locally a branch published by someone else after I did the init.
Is there an easy way to do that ?
Currently I assume I have to
- create a local branch with the desired name and attached on the same commit as the remote branch
- switch to that branch
- set the upstream branch to the remote branch
- do a fuse to get the remote commits
Is that the actual way to do it ? Is there a simpler way ?
The way you did it is fine. You can also skip the last step using the dp/divergent-point flag:
gl branch -c my-local-branch -dp remote/the-remote-branch
(This will take care of downloading any commits that need to be downloaded)
gl switch my-local-branchgl branch -su remote/the-remote-branch.
I am going to label this issue as "docs". We should mention something about this on the documentation