gitless
gitless copied to clipboard
gl branch -c should not publish changes
I ran gl branch -c origin/disproof_of_concept and it unexpectedly pushed my local changes to the remote repository. My expectation was that it would update the local git state to associate the local branch with the remote branch, without pushing the contents of my files there.
In this case, I intended to publish this branch, but this isn't generally true when I manage remote-tracking branches. This isn't something that should happen except on gl publish or git push. This is an action which cannot be taken back, and which would give any reasonable person pause before using gitless on a repository which has a mixture of public code and confidential patches. See also "principle of least astonishment".
I have come to depend on this existing behavior quite extensively and consider it a useful feature. See comment: https://github.com/sdg-mit/gitless/issues/96#issuecomment-323352284
Sincerely, Al